Skip to main content

Automatic Generation Optimization And Learning

Project description

AutoGOAL Logo


PyPI PyPI - Python Version PyPI - License GitHub stars Twitter Follow

Docker Image Size (CPU) Docker Pulls

Build and Push to Docker (main branch) Test Core (main branch) Release to PyPI


AutoGOAL is a Python library for automatically finding the best way to solve a given task. It has been designed mainly for Automated Machine Learning (aka AutoML) but it can be used in any scenario where you have several possible ways to solve a given task.

Technically speaking, AutoGOAL is a framework for program synthesis, i.e., finding the best program to solve a given problem, provided that the user can describe the space of all possible programs. AutoGOAL provides a set of low-level components to define different spaces and efficiently search in them. In the specific context of machine learning, AutoGOAL also provides high-level components that can be used as a black-box in almost any type of problem and dataset format.

⭐ Quickstart

AutoGOAL is first and foremost a framework for Automated Machine Learning. As such, it comes pre-packaged with hundreds of low-level machine learning algorithms that can be automatically assembled into pipelines for different problems.

The core of this functionality lies in the AutoML class.

To illustrate the simplicity of its use we will load a dataset and run an automatic classifier in it. The following code will run for approximately 5 minutes on a classic dataset.

from autogoal.datasets import cars
from autogoal.kb import (MatrixContinuousDense, 
                         Supervised, 
                         VectorCategorical)
from autogoal.ml import AutoML

# Load dataset
X, y = cars.load()

# Instantiate AutoML and define input/output types
automl = AutoML(
    input=(MatrixContinuousDense, 
           Supervised[VectorCategorical]),
    output=VectorCategorical
)

# Run the pipeline search process
automl.fit(X, y)

# Report the best pipeline
print(automl.best_pipeline_)
print(automl.best_score_)

Sensible defaults are defined for each of the many parameters of AutoML. Make sure to read the documentation for more information.

⚙️ Installation

The easiest way to get AutoGOAL up and running with all the dependencies is to pull the development Docker image, which is somewhat big:

docker pull autogoal/autogoal

Instructions for setting up Docker are available here.

Once you have the development image downloaded, you can fire up a console and use AutoGOAL interactively.

If you prefer to not use Docker, or you don't want all the dependencies, you can also install AutoGOAL directly with pip:

pip install autogoal

This will install the core library but you won't be able to use any of the underlying machine learning algorithms until you install the corresponding optional dependencies. You can install them all with:

pip install autogoal[contrib]

To fine-pick which dependencies you want, read the dependencies section.

⚠️ NOTE: By installing through pip you will get the latest release version of AutoGOAL, while by installing through Docker, you will get the latest development version.

The development version is mostly up-to-date with the main branch, hence it will probably contain more features, but also more bugs, than the release version.

💻 CLI

You can use AutoGOAL directly from the CLI. To see options just type:

autogoal

Using the CLI you can train and use AutoML models, download datasets and inspect the contrib libraries without writing a single line of code.

Read more in the CLI documentation.

🤩 Demo

An online demo app is available at autogoal.github.io/demo. This app showcases the main features of AutoGOAL in interactive case studies.

To run the demo locally, simply type:

docker run -p 8501:8501 autogoal/autogoal

And navigate to localhost:8501.

⚖️ API stability

We make a conscious effort to maintain a consistent public API across versions, but the private API can change at any time. In general, everything you can import from autogoal without underscores is considered public.

For example:

# "clean" imports are part of the public API
from autogoal import optimize   
from autogoal.ml import AutoML  
from autogoal.contrib.sklearn import find_classes

# public members of public types as well
automl = AutoML
automl.fit(...) 

# underscored imports are part of the private API
from autogoal.ml._automl import ...
from autogoal.contrib.sklearn._generated import ...

# as well as private members of any type
automl._input_type(...)

These are our consistency rules:

  • Major breaking changes are introduced between major version updates, e.g., x.0 and y.0. These can be additions, removals, or modifications of any kind in any part of the API.

  • Between minor version updates, e.g., 1.x and 1.y, you can expect to find new functionality, but anything you can use from the public API will still be there with a consistent semantic (save for bugfixes).

  • Between micro version updates, e.g., 1.3.x and 1.3.y, the public API is frozen even for additions.

  • The private API can be changed at all times.

⚠️ While AutoGOAL is on public beta (versions 0.x) the public API is considered unstable and thus everything can change. However, we try to keep breaking changes to a minimum.

📚 Documentation

This documentation is available online at autogoal.github.io. Check the following sections:

  • User Guide: Step-by-step showcase of everything you need to know to use AutoGOAL.
  • Examples: The best way to learn how to use AutoGOAL by practice.
  • API: Details about the public API for AutoGOAL.

The HTML version can be deployed offline by downloading the AutoGOAL Docker image and running:

docker run -p 8000:8000 autogoal/autogoal mkdocs serve -a 0.0.0.0:8000

And navigating to localhost:8000.

📃 Publications

If you use AutoGOAL in academic research, please cite the following paper:

@article{estevez2020general,
  title={General-purpose hierarchical optimisation of machine learning pipelines with grammatical evolution},
  author={Est{\'e}vez-Velarde, Suilan and Guti{\'e}rrez, Yoan and Almeida-Cruz, Yudivi{\'a}n and Montoyo, Andr{\'e}s},
  journal={Information Sciences},
  year={2020},
  publisher={Elsevier},
  doi={10.1016/j.ins.2020.07.035}
}

The technologies and theoretical results leading up to AutoGOAL have been presented at different venues:

🤝 Contribution

Code is licensed under MIT. Read the details in the collaboration section.

This project follows the all-contributors specification. Any contribution will be given credit, from fixing typos, to reporting bugs, to implementing new core functionalities.

Here are all the current contributions.

🙏 Thanks!


Suilan Estevez-Velarde

💻 ⚠️ 🤔 📖

Alejandro Piad

💻 ⚠️ 📖

Yudivián Almeida Cruz

🤔 📖

ygutierrez

🤔 📖

Ernesto Luis Estevanell Valladares

💻 ⚠️

Alexander Gonzalez

💻 ⚠️

Anshu Trivedi

💻

Alex Coto

📖

Guillermo Blanco

🐛 💻 📖

yacth

🐛 💻

Brandon Fergerson

🐛

Aditya Nikhil

🐛

lucas-FP

🐛 💻

Leynier Gutiérrez González

📖

Ender Minyard

📖

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

autogoal-1.0.1a1.tar.gz (83.1 kB view details)

Uploaded Source

Built Distribution

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

autogoal-1.0.1a1-py3-none-any.whl (96.3 kB view details)

Uploaded Python 3

File details

Details for the file autogoal-1.0.1a1.tar.gz.

File metadata

  • Download URL: autogoal-1.0.1a1.tar.gz
  • Upload date:
  • Size: 83.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.7

File hashes

Hashes for autogoal-1.0.1a1.tar.gz
Algorithm Hash digest
SHA256 ca423e6753812ee7daa8245ccde43180a1edbdd04678f6e9e13932875898731c
MD5 3968c70d49ccdd3dab19680c8d31755e
BLAKE2b-256 16bbb015d9f9a66200bca96a2cccdbd3a8bf4b38ebe18a05b8a6cd0374259d72

See more details on using hashes here.

File details

Details for the file autogoal-1.0.1a1-py3-none-any.whl.

File metadata

  • Download URL: autogoal-1.0.1a1-py3-none-any.whl
  • Upload date:
  • Size: 96.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.7

File hashes

Hashes for autogoal-1.0.1a1-py3-none-any.whl
Algorithm Hash digest
SHA256 597b5fba60f9cc3e6185e63abbabf9d74ac9506a2fee242f948ec197f52a11e2
MD5 c06abf98a23f0255eed14af4a4c457ff
BLAKE2b-256 e63fa14a7064510a30acc6176741d08e2adb5bec8a20c2bbd849d8f08d1f03e6

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