LightAutoML Documentation

repository·master·Indexed 23 days ago

https://github.com/sb-ai-lab/lightautoml

A fast and customizable automated machine learning (AutoML) framework for creating high-performance models for tabular, time series, image, and text data. It features specialized presets like TabularAutoML and TabularNLPAutoML, modular pipeline construction, automatic hyperparameter tuning, and blending tools to aggregate predictions. Version 0.4.2 supports various dataset interfaces including Pandas, NumPy, and CSR sparse matrices.

Tokens
23.6K
Snippets
47
Records
126
Agent score
80%

What's inside LightAutoML

  1. Overview of lightautoml.transformers

    master

    The lightautoml.transformers module provides basic feature generation steps and helper utilities for automated machine learning. It is organized into specialized categories based on the data type being transformed:

    • Base Classes: Core logic for transformer composition and dataset manipulation.
    • Numeric: Transformations for continuous and discrete numerical data.
    • Categorical: Encoders and intersection tools for categorical features.
    • Datetime: Feature extraction from temporal data.
    • Decompositions: Dimensionality reduction techniques.
    • Text: NLP-related transformations and wrappers.
    • Image: Computer vision feature extraction and wrappers.
  2. Overview of LightAutoML capabilities

    master

    LightAutoML is an open-source Python library for automated machine learning (AutoML) optimized for tabular and text data. It provides a lightweight and efficient pipeline for several automated tasks, including:

    • Automatic hyperparameter tuning and data processing: Optimizing model parameters and preparing data automatically.
    • Automatic typing and feature selection: Identifying data types and selecting the most relevant features.
    • Automatic time utilization: Managing computational resources efficiently.
    • Automatic report creation: Generating summaries of the machine learning process.
    • Modular pipeline creation: A flexible scheme that allows users to build and customize their own machine learning pipelines.
  3. Use lightautoml.reader for data processing

    master

    The lightautoml.reader module provides utility classes and functions for reading, training, and analyzing data. It is organized into two main functional areas:

    1. Readers: Base abstractions for data ingestion.
    2. Tabular Batch Generators: Tools for creating batches of data, which is essential for efficient training and processing of tabular datasets.
  4. Extract image features with lightautoml.image

    master

    The lightautoml.image module provides tools for extracting features from images using color histograms or CNN embeddings.

    Key components include:

    • Image Feature Extractors: Classes like CreateImageFeatures and TimmModelEmbedder for generating feature vectors.
    • PyTorch Image Datasets: Specialized datasets like ImageTimmDataset and embedders like DeepTimmImageEmbedder designed for integration with PyTorch workflows.
  5. Explore LightAutoML and HypEx tutorials

    master
    LightAutoML provides tutorials for a wide range of machine learning tasks, from basic model training to advanced topics like time series and neural networks. HypEx provides tutorials focused on statistical testing (A/B and A/A testing), matching methods, and modeling limit distributions.
  6. Generate reports using lightautoml.report

    master

    The lightautoml.report module provides tools for generating reports and templates for machine learning models. It primarily uses decorators to wrap model training or evaluation processes to produce structured output.

    Key components include:

    • ReportDeco: A decorator for standard report generation.
    • ReportDecoWhitebox: A decorator designed for 'white-box' reporting, likely providing deeper insights into model internals or feature importance.
  7. Use the lightautoml.automl module for end-to-end training

    master
    The lightautoml.automl module is the primary entry point for the library. It provides the core AutoML class, specialized presets for different data types and tasks, and blending tools to combine multiple models. Use AutoML for general-purpose automated machine learning workflows.
  8. Available Machine Learning Algorithms in lightautoml.ml_algo

    master

    The lightautoml.ml_algo module provides various model implementations used within machine learning pipelines. These are categorized into Base Classes, Linear Models, Boosted Trees, Neural Networks, and WhiteBox models.

    Base Classes

    • MLAlgo: The fundamental base class for machine learning algorithms.
    • TabularMLAlgo: A specialized base class for algorithms designed for tabular data.

    Linear Models

    • linear_sklearn.LinearLBFGS: Linear model using L-BFGS optimization.
    • linear_sklearn.LinearL1CD: Linear model with L1 regularization and Coordinate Descent.
    • dl_model.TorchModel: A linear model implemented using PyTorch.

    Boosted Trees

    • boost_lgbm.BoostLGBM: Gradient Boosting implementation using LightGBM.
    • boost_cb.BoostCB: Gradient Boosting implementation using CatBoost.

    Neural Networks (torch_based)

    • nn_models.MLP: Multi-Layer Perceptron.
    • nn_models.DenseLightModel: A lightweight dense neural network.
    • nn_models.DenseModel: A standard dense neural network.
    • nn_models.ResNetModel: A ResNet-based architecture.
    • nn_models.SNN: Spiking Neural Network implementation.

    WhiteBox

    • whitebox.WbMLAlgo: White-box machine learning algorithms designed for interpretability.
  9. Hyperparameter tuning with LightAutoML

    master

    LightAutoML provides several classes for hyperparameter tuning, organized into base classes and specific implementations like Optuna.

    Base Classes (lightautoml.ml_algo.tuning.base):

    • ParamsTuner: A base class for parameter tuning.
    • DefaultTuner: A default implementation for tuning.

    Tuning with Optuna (lightautoml.ml_algo.tuning.optuna): For more advanced optimization, LightAutoML supports Optuna-based tuners:

    • OptunaTuner: Standard Optuna-based hyperparameter tuner.
    • DLOptunaTuner: A specialized version of the Optuna tuner (likely for Deep Learning or specific architectures).
  10. Measure execution time with Timer utilities

    master

    The lightautoml.utils.timer module provides several classes to track execution time across different granularities of a machine learning process:

    • Timer: A general-purpose timer.
    • PipelineTimer: Specifically designed to time entire machine learning pipelines.
    • TaskTimer: Designed to time individual tasks within a workflow.