Skip to main content

A Python package for automated machine learning tasks with genetic algorithm-based dataset summarization.

Project description

SubStrat Package

SubStrat is a Python package designed to provide a substrate for automated machine learning tasks. It comes integrated with functionalities from the popular AutoSklearn library, and also includes a genetic algorithm-based dataset summarization utility.

SubStratis based on The SubStart Article

Features

  • Automated Machine Learning (AutoML): Using the power of the AutoSklearn library, users can seamlessly train and fine-tune machine learning models on their dataset.

  • Genetic Dataset Summarization: SubStrat includes a genetic algorithm-based approach to summarize datasets, providing concise data representations while retaining vital information.

SubStrat Flow

  • Run genetic algorithm-based to find sub set dataset that yet represet the full size dataset.
  • On the sub set dataset runs full search of Automl.
  • Extrat the model with the highet score.
  • Run another time the automl to finetune the hyper-parameters fot the specific model.
  • Returns the classifier

Very recomended to use venv.

python3 -m venv subsrat_vev

Installing the SubStrat package.

pip install substart-automl

Usage

from SubStrat import SubStrat

# Initialize SubStrat with a dataset and target column
s = SubStrat(dataset=my_dataset, target_col_name='target')
# Excute SubStrat flow
cls = s.run()

see basic example here

Classes

SubStrat

Provides the primary interface for the AutoML functionalities.

Attributes:

  • dataset: Input dataset (pandas DataFrame).
  • target_col_name: Name of the target column in the dataset.
  • input_classifier: Classifier instance (optional). Defaults to an instance from AutoSklearn.
  • summary_algorithm: Algorithm to summarize the dataset. Defaults to GeneticSubAlgorithmn.
  • desired_accuracy:Desired accuracy for the output classifier.

Methods:

  • run(): Executes the SubStrat flow, and returns AutoSklearnClassifier.

GeneticSubAlgorithmn

Implements the genetic algorithm for dataset summarization.

Attributes:

  • dataset: The original dataset that needs to be summarized.
  • target_column_name: The name of the target column in the dataset.
  • sub_row_size: The number of rows for the subset of the dataset (summary). If not provided, it will be calculated based on a predefined rule.
  • sub_col_size: The number of columns for the subset of the dataset (summary). If not provided, it will be calculated based on a predefined rule.
  • population_size: The number of individuals in the population for the genetic algorithm.
  • fitness: The fitness function used in the genetic algorithm. If not provided, a default fitness function will be used.
  • selection: The selection operator used in the genetic algorithm. If not provided, a default selection operator will be used.
  • mutation_rate: The mutation rate used in the genetic algorithm.
  • num_generation: The number of generations the genetic algorithm will run for.
  • init_pop: The algorithm used to initialize the population for the genetic algorithm. If not provided, a default algorithm will be used.
  • stagnation_limit: Number of generations without improvement in best gene score before stopping.
  • time_limit: Maximum time in seconds the run function can execute.

Methods:

  • run(): Executes the genetic algorithm and returns the best subset of the dataset.

futute features

  • Add verbose mode.
  • Add the option to use more AutoML frameworks, like TPOT.
  • Make SubStrat more configable by the user.
  • Make the UX more friendly.

Citing information

Teddy Lazebnik, Amit Somech, and Abraham Itzhak Weinberg. 2022. SubStrat: A Subset-Based Optimization Strategy for Faster AutoML. Proc. VLDB Endow. 16, 4 (December 2022), 772–780. https://doi.org/10.14778/3574245.3574261

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

substrat-automl-0.0.4.tar.gz (19.6 kB view details)

Uploaded Source

File details

Details for the file substrat-automl-0.0.4.tar.gz.

File metadata

  • Download URL: substrat-automl-0.0.4.tar.gz
  • Upload date:
  • Size: 19.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.10.12

File hashes

Hashes for substrat-automl-0.0.4.tar.gz
Algorithm Hash digest
SHA256 4e1b05a64cacfb826f3284ce040f771bc6b8c1039c523b883a6cbc97c5c8e263
MD5 442e1ac64683b5dd049a1d169549ab48
BLAKE2b-256 721693f3a716fa4d59ca6e5311a67f27de5dce45bcaee11922e5569bb19363e2

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