Skip to main content

A package for automated machine learning based on scikit-learn.

Project description

GAMA logo

General Automated Machine learning Assistant
An automated machine learning tool based on genetic programming.
Make sure to check out the documentation.

Build Status codecov DOI


GAMA is an AutoML package for end-users and AutoML researchers. It generates optimized machine learning pipelines given specific input data and resource constraints. A machine learning pipeline contains data preprocessing (e.g. PCA, normalization) as well as a machine learning algorithm (e.g. Logistic Regression, Random Forests), with fine-tuned hyperparameter settings (e.g. number of trees in a Random Forest).

To find these pipelines, multiple search procedures have been implemented. GAMA can also combine multiple tuned machine learning pipelines together into an ensemble, which on average should help model performance. At the moment, GAMA is restricted to classification and regression problems on tabular data.

In addition to its general use AutoML functionality, GAMA aims to serve AutoML researchers as well. During the optimization process, GAMA keeps an extensive log of progress made. Using this log, insight can be obtained on the behaviour of the search procedure. For example, it can produce a graph that shows pipeline fitness over time: graph of fitness over time

Note: we temporarily disabled support for the GAMA Dashboard, we will add out-of-the-box visualization again later this year.

Installing GAMA

You can install GAMA with pip: pip install gama

Minimal Example

The following example uses AutoML to find a machine learning pipeline that classifies breast cancer as malign or benign. See the documentation for examples in classification, regression, using ARFF as input.

from sklearn.datasets import load_breast_cancer
from sklearn.model_selection import train_test_split
from sklearn.metrics import log_loss, accuracy_score
from gama import GamaClassifier

if __name__ == '__main__':
    X, y = load_breast_cancer(return_X_y=True)
    X_train, X_test, y_train, y_test = train_test_split(X, y, stratify=y, random_state=0)

    automl = GamaClassifier(max_total_time=180, store="nothing")
    print("Starting `fit` which will take roughly 3 minutes.")
    automl.fit(X_train, y_train)

    label_predictions = automl.predict(X_test)
    probability_predictions = automl.predict_proba(X_test)

    print('accuracy:', accuracy_score(y_test, label_predictions))
    print('log loss:', log_loss(y_test, probability_predictions))
    # the `score` function outputs the score on the metric optimized towards (by default, `log_loss`)
    print('log_loss', automl.score(X_test, y_test))

note: By default, GamaClassifier optimizes towards log_loss.

Citing

If you want to cite GAMA, please use our ECML-PKDD 2020 Demo Track publication.

@InProceedings{10.1007/978-3-030-67670-4_39,
author="Gijsbers, Pieter and Vanschoren, Joaquin",
editor="Dong, Yuxiao
and Ifrim, Georgiana
and Mladeni{\'{c}}, Dunja
and Saunders, Craig
and Van Hoecke, Sofie",
title="GAMA: A General Automated Machine Learning Assistant",
booktitle="Machine Learning and Knowledge Discovery in Databases. Applied Data Science and Demo Track",
year="2021",
publisher="Springer International Publishing",
address="Cham",
pages="560--564",
abstract="The General Automated Machine learning Assistant (GAMA) is a modular AutoML system developed to empower users to track and control how AutoML algorithms search for optimal machine learning pipelines, and facilitate AutoML research itself. In contrast to current, often black-box systems, GAMA allows users to plug in different AutoML and post-processing techniques, logs and visualizes the search process, and supports easy benchmarking. It currently features three AutoML search algorithms, two model post-processing steps, and is designed to allow for more components to be added.",
isbn="978-3-030-67670-4"
}

License

The contents of this repository is under an Apache-2.0 License.

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

gama-23.0.0.tar.gz (67.8 kB view details)

Uploaded Source

Built Distribution

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

gama-23.0.0-py3-none-any.whl (85.8 kB view details)

Uploaded Python 3

File details

Details for the file gama-23.0.0.tar.gz.

File metadata

  • Download URL: gama-23.0.0.tar.gz
  • Upload date:
  • Size: 67.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.10.12

File hashes

Hashes for gama-23.0.0.tar.gz
Algorithm Hash digest
SHA256 334ad633930d2d85f6106e620f0b94e8969e849c2001a8c84a9466b48f9de612
MD5 885d72fcba4dbaf5b026acea659f53bb
BLAKE2b-256 d87237529d8b5c3e3c6cb2a5196722ff75c48a8d4c465177a9b02200a40e1f86

See more details on using hashes here.

File details

Details for the file gama-23.0.0-py3-none-any.whl.

File metadata

  • Download URL: gama-23.0.0-py3-none-any.whl
  • Upload date:
  • Size: 85.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.10.12

File hashes

Hashes for gama-23.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 4659bc143c13967846a5706256b038360f099b56765ffe0d397d1f8e971274b6
MD5 b4745ddadc1ce806568856ef6aa13407
BLAKE2b-256 6ba452ab255af62f00556ffa13256811ed5bc07d73a4e3b49f3696119e1bfa91

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