Skip to main content

A Python toolkit for easily building and evaluating machine learning models.

Project description

easyml

Project Status: Active – The project has reached a stable, usable state and is being actively developed. https://zenodo.org/badge/DOI/10.5281/zenodo.241372.svg Documentation Status https://travis-ci.org/CCS-Lab/easyml.svg?branch=master

A toolkit for easily building and evaluating machine learning models.

Python tutorial: http://easyml.readthedocs.io

Installation

You can install the latest development version from PyPI:

pip install easymlpy

Or from GitHub with:

git clone https://github.com/CCS-Lab/easyml.git
cd easyml/Python
pip install .
pip install -r requirements.txt

If you encounter a clear bug, please file a minimal reproducible example on github.

Examples

Load the easymlpy library:

from easymlpy.datasets import load_prostate, load_cocaine_dependence
from easymlpy.glmnet import easy_glmnet

For a dataset with a continuous dependent variable:

# Load data
prostate = load_prostate()

# Analyze data
output = easy_glmnet(prostate, 'lpsa',
                     random_state=1, progress_bar=True, n_core=1,
                     n_samples=100, n_divisions=10, n_iterations=5,
                     model_args={'alpha': 1, 'n_lambda': 200})

For a dataset with a binary dependent variable:

# Load data
cocaine_dependence = load_cocaine_dependence()

# Analyze data
results = easy_glmnet(cocaine_dependence, 'diagnosis',
                      family='binomial',
                      exclude_variables=['subject'],
                      categorical_variables=['male'],
                      random_state=12345, progress_bar=True, n_core=1,
                      n_samples=5, n_divisions=5, n_iterations=2,
                      model_args={'alpha': 1, 'n_lambda': 200})

Citation

A whitepaper for easyml is available at https://doi.org/10.1101/137240. If you find this code useful please cite us in your work:

@article {Hendricks137240,
    author = {Hendricks, Paul and Ahn, Woo-Young},
    title = {Easyml: Easily Build And Evaluate Machine Learning Models},
    year = {2017},
    doi = {10.1101/137240},
    publisher = {Cold Spring Harbor Labs Journals},
    URL = {http://biorxiv.org/content/early/2017/05/12/137240},
    journal = {bioRxiv}
}

References

Hendricks, P., & Ahn, W.-Y. (2017). Easyml: Easily Build And Evaluate Machine Learning Models. bioRxiv, 137240. http://doi.org/10.1101/137240

Project details


Download files

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

Source Distribution

easymlpy-0.1.1.tar.gz (8.3 kB view hashes)

Uploaded Source

Supported by

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