General Automated Machine learning Assistant
An automated machine learning tool based on genetic programming.
Make sure to check out the documentation.
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:
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.
Metadata
Release files for gama 23.0.0.post1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| gama-23.0.0.post1.tar.gz | 68.0 kB | Without provenance | Details for gama-23.0.0.post1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| gama-23.0.0.post1-py3-none-any.whl | Python 3 | none | any | Details for gama-23.0.0.post1-py3-none-any.whl |
Total release size: 153.9 kB
Release files / gama-23.0.0.post1.tar.gz
| Download URL | gama-23.0.0.post1.tar.gz |
|---|---|
| Size | 68.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
0f9419a1795e8d8b48958e604e832d22d88f4d828723d370e45c4404f566293f
|
|
BLAKE2b-256 checksum How to use checksums |
b4acebb7999b483bd245d4fbd8b559c4175dd756eee385682ed06fd92b5fbc52
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.1.0 CPython/3.10.14
|
Release files / gama-23.0.0.post1-py3-none-any.whl
| Download URL | gama-23.0.0.post1-py3-none-any.whl |
|---|---|
| Size | 85.9 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
5762808d13bf6c047982966b2453400394380bfa7ab94c7d58f41eb03ba03d8f
|
|
BLAKE2b-256 checksum How to use checksums |
b7c0271284a12fd697ff4949e8062f9c0cf87858ea3d330f0330a347a507354b
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.1.0 CPython/3.10.14
|
Security for gama 23.0.0.post1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.