Fast and customizable framework for automatic ML model creation (AutoML)
logocolor.png />
Documentation | Installation | Examples | Telegram chat | Telegram channel
LightAutoML (LAMA) allows you create machine learning models using just a few lines of code, or build your own custom pipeline using ready blocks. It supports tabular, time series, image and text data.
Authors: Alexander Ryzhkov, Anton Vakhrushev, Dmitry Simakov, Rinchin Damdinov, Vasilii Bunakov, Alexander Kirilin, Pavel Shvets.
Quick tour
There are two ways to solve machine learning problems using LightAutoML:
- Ready-to-use preset:
from lightautoml.automl.presets.tabular_presets import TabularAutoML from lightautoml.tasks import Task
automl = TabularAutoML(task = Task(name = 'binary', metric = 'auc')) oofpreds = automl.fitpredict(traindf, roles = {'target': 'mytarget', 'drop': ['columntodrop']}).data testpreds = automl.predict(testdf).data
- As a framework:
Resources
Kaggle kernel examples of LightAutoML usage:
- Tabular Playground Series April 2021 competition solution
- Titanic competition solution (80% accuracy)
- Titanic 12-code-lines competition solution (78% accuracy)
- House prices competition solution
- Natural Language Processing with Disaster Tweets solution
- Tabular Playground Series March 2021 competition solution
- Tabular Playground Series February 2021 competition solution
- Interpretable WhiteBox solution
- Custom ML pipeline elements inside existing ones
- Custom ML pipeline elements inside existing ones
- Tabular Playground Series November 2022 competition solution with Neural Networks
Google Colab tutorials and other examples:
Tutorial1_basics.ipynb- get started with LightAutoML on tabular data.Tutorial2WhiteBox_AutoWoE.ipynb- creating interpretable models.Tutorial3sqldata_source.ipynb- shows how to use LightAutoML presets (both standalone and time utilized variants) for solving ML tasks on tabular data from SQL data base instead of CSV.Tutorial4NLP_Interpretation.ipynb- example of using TabularNLPAutoML preset, LimeTextExplainer.Tutorial5_uplift.ipynb- shows how to use LightAutoML for a uplift-modeling task.Tutorial6custom_pipeline.ipynb- shows how to create your own pipeline from specified blocks: pipelines for feature generation and feature selection, ML algorithms, hyperparameter optimization etc.Tutorial7ICEandPDP_interpretation.ipynb- shows how to obtain local and global interpretation of model results using ICE and PDP approaches.Tutorial8CV_preset.ipynb- example of using TabularCVAutoML preset in CV multi-class classification task.Tutorial9neural_networks.ipynb- example of using Tabular preset with neural networks.Tutorial10relationaldatawithstar_scheme.ipynb- example of using Tabular preset with neural networks.Tutorial11time_series.ipynb- example of using Tabular preset with timeseries data.
Note 2: to take a look at this report after the run, please comment last line of demo with report deletion command.
Courses, videos
- LightAutoML crash courses:
- Video guides:
- Articles about LightAutoML:
Installation
To install LAMA framework on your machine from PyPI:# Base functionality: pip install -U lightautoml
For partial installation use corresponding option
Extra dependencies: [nlp, cv, report] or use 'all' to install all dependencies
pip install -U lightautoml[nlp]
Or extra dependencies with specific version
pip install 'lightautoml[all]==0.4.0'
Additionally, run following commands to enable pdf report generation:
# MacOS
brew install cairo pango gdk-pixbuf libffi
Debian / Ubuntu
sudo apt-get install build-essential libcairo2 libpango-1.0-0 libpangocairo-1.0-0 libgdk-pixbuf2.0-0 libffi-dev shared-mime-info
Fedora
sudo yum install redhat-rpm-config libffi-devel cairo pango gdk-pixbuf2
Windows
follow this tutorial https://weasyprint.readthedocs.io/en/stable/install.html#windows
Advanced features
GPU and Spark pipelines
Full GPU and Spark pipelines for LightAutoML currently available for developers testing (still in progress). The code and tutorials for:- GPU pipeline is available here
- Spark pipeline is available here
Contributing to LightAutoML
If you are interested in contributing to LightAutoML, please read the Contributing Guide to get started.Support and feature requests
- Seek prompt advice in Telegram group.
- Open bug reports and feature requests on GitHub issues.
Citation
If you mention LightAutoML in your publications, please cite our paper: Vakhrushev, et al. "LightAutoML: AutoML Solution for a Large Financial Services Ecosystem" arXiv:2109.01528, 2021.BibTeX entry:
@article{vakhrushev2021lightautoml, title={Lightautoml: Automl solution for a large financial services ecosystem}, author={Vakhrushev, Anton and Ryzhkov, Alexander and Savchenko, Maxim and Simakov, Dmitry and Damdinov, Rinchin and Tuzhilin, Alexander}, journal={arXiv preprint arXiv:2109.01528}, year={2021} }