Skip to main content

Build Status Python 3.6 PyPI version Documentation Status Binder

aikit

Automatic Tool Kit for Machine Learning and Datascience.

The objective is to provide tools to ease the repetitive part of the DataScientist job and so that he/she can focus on modelization. This package is still in alpha and more features will be added. Its mains features are:

  • improved and new "scikit-learn like" transformers ;
  • GraphPipeline : an extension of sklearn Pipeline that handles more generic chains of tranformations ;
  • an AutoML to automatically search throught several transformers and models.

Full documentation is available here: https://aikit.readthedocs.io/en/latest/

You can run examples here, thanks to Binder.

GraphPipeline

The GraphPipeline object is an extension of sklearn.pipeline.Pipeline but the transformers/models can be chained with any directed graph.

The objects takes as input two arguments:

  • models: dictionary of models (each key is the name of a given node, and each corresponding value is the transformer corresponding to that node)
  • edges: list of tuples that links the nodes to each other

Example:

gpipeline = GraphPipeline(
    models = {
        "vect": CountVectorizerWrapper(analyzer="char",
                                       ngram_range=(1, 4),
                                       columns_to_use=["text1", "text2"]),
        "cat": NumericalEncoder(columns_to_use=["cat1", "cat2"]),
        "rf": RandomForestClassifier(n_estimators=100)
    },
    edges = [("vect", "rf"), ("cat", "rf")]
)

Alt text

AutoML

Aikit contains an AutoML part which will test several models and transformers for a given dataset.

For example, you can create the following python script run_automl_titanic.py:

from aikit.datasets import load_dataset, DatasetEnum
from aikit.ml_machine import MlMachineLauncher

def loader():
    dfX, y, *_ = load_dataset(DatasetEnum.titanic)
    return dfX, y

def set_configs(launcher):
    """ modify that function to change launcher configuration """
    launcher.job_config.score_base_line = 0.75
    launcher.job_config.allow_approx_cv = True
    return launcher

if __name__ == "__main__":
    launcher = MlMachineLauncher(base_folder = "~/automl/titanic",
                                 name = "titanic",
                                 loader = loader,
                                 set_configs = set_configs)
    launcher.execute_processed_command_argument()

And then run the command:

python run_automl_titanic.py run -n 4

To run the automl using 4 workers, the results will be stored in the specified folder You can aggregate those result using:

python run_automl_titanic.py result

Metadata

Release files for aikit 0.2.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Built distribution (wheel)

Table of built distributions (wheels) for aikit 0.2.2
File Interpreter ABI Platform
aikit-0.2.2-py2.py3-none-any.whl Python 3, Python 2 none any Details

Release files / aikit-0.2.2-py2.py3-none-any.whl

Download URL aikit-0.2.2-py2.py3-none-any.whl
Size 177.3 kB
Tags Python 2 Python 3
SHA-256 checksum
How to use checksums
6e4cdc0c36ff51c18d430fecdad2932e4f10926acca3c87c4b656c8732da00e9
BLAKE2b-256 checksum
How to use checksums
de5261e82560d6de7c29d426cc517f6bb7f43bac792a6c654493877ec4a4b1ad
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.0.1 requests-toolbelt/0.9.1 tqdm/4.45.0 CPython/3.7.4

Release history Release notifications | RSS feed

This release

0.2.2 This release

1 release file

0.2.1

1 release file

0.1.4

1 release file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page