Skip to main content

MondoBrain API wrapper

Reason this release was yanked:

mondobrain is no longer maintained. Please use datawhys instead: https://pypi.org/project/datawhys/

Project description

MondoBrain Python SDK

MondoBrain Python SDK is a python wrapper for the MondoBrain API that provides additional functionality such as dataframe ingest and one-off processing

Installation

Use the package manager pip to install mondobrain.

pip install mondobrain

Dependencies

Install from source

In the mondobrain-python directory (same directory as this README.md file), run this command in your terminal:

pip install -e .

Usage

import mondobrain as mb

# Set your credentials
mb.api_key = "<API-KEY>"
mb.api_secret = "<API-SECRET>"

# Build a pandas dataframe and store in `df` (not shown)

# Convert your pandas df to a mondobrain df
mdf = mb.MondoDataFrame(df)

# Select a column as your outcome column & specify a target class
outcome = mdf["column_name"]

# for a discrete column
outcome.target_class = "Some_modality"

# for a continuous column the value should be `min` or `max`
outcome.target_class = "max"

# Get a dataframe of all columns you want to explor
explorable = mdf[["column_a", "column_b"]]

# Create a solver instance
solver = mb.Solver()

# Fit your data
solver.fit(explorable, outcome)

# Check your results
solver.rule

See documentation and SDK Example.ipynb in the mondobrain-python directory for more in depth examples.

The package includes documentation to provide explanation and examples of usage.

Contributing

Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change. Take a look at CONTRIBUTING.md for more info

Please make sure to update tests as appropriate.

License

MIT

Project details


Release history Release notifications | RSS feed

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

mondobrain-0.1.8.tar.gz (38.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

mondobrain-0.1.8-py3-none-any.whl (192.9 kB view details)

Uploaded Python 3

File details

Details for the file mondobrain-0.1.8.tar.gz.

File metadata

  • Download URL: mondobrain-0.1.8.tar.gz
  • Upload date:
  • Size: 38.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/4.0.1 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.60.0 CPython/3.6.13

File hashes

Hashes for mondobrain-0.1.8.tar.gz
Algorithm Hash digest
SHA256 cab5270233ba752bc1f313c9c10963fec4b873a5964f88736babe7aa50027cb2
MD5 d7aff4b6ae1b62f4aa092bacf2288c8a
BLAKE2b-256 2a32360c7b6660ffd4f898cb9c9d6bc8cb42d23922729707dbe82f12e4c26bd0

See more details on using hashes here.

File details

Details for the file mondobrain-0.1.8-py3-none-any.whl.

File metadata

  • Download URL: mondobrain-0.1.8-py3-none-any.whl
  • Upload date:
  • Size: 192.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/4.0.1 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.60.0 CPython/3.6.13

File hashes

Hashes for mondobrain-0.1.8-py3-none-any.whl
Algorithm Hash digest
SHA256 1702476ed0dc6eb824fdbf74cce479438fab81d2483f956aa69673c39538a79a
MD5 dc7f4a57e65276e49dd80b73c9879ce4
BLAKE2b-256 1db257f3968a07d26868d148ef2dbd128935a6725966eeccb325917ea0b5478d

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page