Skip to main content

A python package to simplify data modeling.

Project description

SimpleLearn

A python package to simplify and automate data science workflows such as data modelling.

Installation

$ pip install simple-learn

Primer

This package is based off Google AutoML and hopes to allow people with limited machine learning knowledge to train high performance models for their specific use cases. Similar to AutoML, SimpleLearn aims to create an automatic process of model algorithm selection, hyper parameter tuning, iterative modelling, and model assessment. Under the hood, SimpleLearn is using a greedy algorithm to select/assess the model algorithm while leveraging a grid search to tune model hyperparameters. The metrics for assessing the model can all be configured via input parameters. Keep in mind this package does NOT automate the entire process of data science and assumes you are handling tasks such as data preparation and feature engineering. A strong model algorithm cannot apologize for bad data.

Usage

The following are examples of how to use some of the classes in SimpleLearn.

SimpleClassifier

>>> from sklearn.datasets import load_iris
>>> from simple_learn.classifiers import SimpleClassifier
>>>
>>> iris = load_iris()
>>> clf = SimpleClassifier()
>>> clf.fit(iris.data, iris.target)
>>> clf
{
    "Type": "KNeighborsClassifier",
    "Training Duration": "0.0006814002990722656s",
    "GridSearch Duration": "0.17136621475219727s",
    "Parameters": {
        "metric": "euclidean",
        "n_neighbors": 4,
        "weights": "uniform"
    },
    "Metrics": {
        "Training Accuracy": 0.9866666666666667,
        "Jaccard Score": 0.9245283018867925,
        "F1 Score": 0.96
    }
}

SimpleClassifierList

>>> from sklearn.datasets import load_iris
>>> from simple_learn.classifiers import SimpleClassifierList
>>>
>>> iris = load_iris()
>>> clf_list = SimpleClassifierList()
>>> clf_list.fit(iris.data, iris.target)
>>> clf_list
{
    "Type": "KNeighborsClassifier",
    "Rank": 1,
    "Training Duration": "0.0005269050598144531s",
    "GridSearch Duration": "0.17510604858398438s",
    "Parameters": {
        "metric": "euclidean",
        "n_neighbors": 4,
        "weights": "uniform"
    },
    "Metrics": {
        "Training Accuracy": 0.9866666666666667,
        "Jaccard Score": 0.9245283018867925,
        "F1 Score": 0.96
    },
    "Index": 0
}
{
    "Type": "DecisionTreeClassifier",
    "Rank": 2,
    "Training Duration": "0.0004031658172607422s",
    "GridSearch Duration": "0.06979990005493164s",
    "Parameters": {
        "criterion": "gini",
        "max_depth": 3
    },
    "Metrics": {
        "Training Accuracy": 0.9733333333333333,
        "Jaccard Score": 0.9486989764459243,
        "F1 Score": 0.9733226623982927
    },
    "Index": 1
}
{
    "Type": "ExtraTreeClassifier",
    "Rank": 3,
    "Training Duration": "0.00039696693420410156s",
    "GridSearch Duration": "0.11928296089172363s",
    "Parameters": {
        "criterion": "gini",
        "max_depth": 4,
        "splitter": "best"
    },
    "Metrics": {
        "Training Accuracy": 0.9666666666666667,
        "Jaccard Score": 0.9611613876319759,
        "F1 Score": 0.97999799979998
    },
    "Index": 2
}
...
>>> clf = clf_list.pop(index=2) # default index is 0
>>> clf
{
    "Type": "ExtraTreeClassifier",
    "Training Duration": "0.00039696693420410156s",
    "GridSearch Duration": "0.11928296089172363s",
    "Parameters": {
        "criterion": "gini",
        "max_depth": 4,
        "splitter": "best"
    },
    "Metrics": {
        "Training Accuracy": 0.9666666666666667,
        "Jaccard Score": 0.9611613876319759,
        "F1 Score": 0.97999799979998
    }
}

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

simple_learn-0.0.13.tar.gz (4.1 kB view details)

Uploaded Source

Built Distribution

simple_learn-0.0.13-py3-none-any.whl (5.0 kB view details)

Uploaded Python 3

File details

Details for the file simple_learn-0.0.13.tar.gz.

File metadata

  • Download URL: simple_learn-0.0.13.tar.gz
  • Upload date:
  • Size: 4.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/51.1.1 requests-toolbelt/0.9.1 tqdm/4.42.1 CPython/3.7.6

File hashes

Hashes for simple_learn-0.0.13.tar.gz
Algorithm Hash digest
SHA256 c9edeff96b3ca2eb7bd8380db63a388cb2f37b8a6c1d8516d9b5b0071e1f0986
MD5 06691f0118f09c3789d2e26510dec15b
BLAKE2b-256 cc6fee5d29ebe0071661f2e02839f8ee669a9a22673a7cf3d61cfdd5f0cf0e42

See more details on using hashes here.

File details

Details for the file simple_learn-0.0.13-py3-none-any.whl.

File metadata

  • Download URL: simple_learn-0.0.13-py3-none-any.whl
  • Upload date:
  • Size: 5.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/51.1.1 requests-toolbelt/0.9.1 tqdm/4.42.1 CPython/3.7.6

File hashes

Hashes for simple_learn-0.0.13-py3-none-any.whl
Algorithm Hash digest
SHA256 7f465b6ebde1ef6cf06d01b66d2bf65bf105a8a664e887b4c0ca64c5591cada4
MD5 b2fca39aa35bb0f63e558e65068d32fc
BLAKE2b-256 35ac22efe6b46ebbb75b14528465281af0f4d931e8d4f9197900cb3de18b8df6

See more details on using hashes here.

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