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
cd subsrat_vev
sourch bin/activate

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 Example in google Colab

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.5.tar.gz (19.8 kB view details)

Uploaded Source

File details

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

File metadata

  • Download URL: substrat-automl-0.0.5.tar.gz
  • Upload date:
  • Size: 19.8 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.5.tar.gz
Algorithm Hash digest
SHA256 c8a9c6d4f4ff87c6a6d58e55bfdc001920d19c60a11695feb126fbbd126b622d
MD5 b1397c194279f2239839694af5137ad1
BLAKE2b-256 d18bf729261230119b274174a202a2690c44c63157875c5fdb7ce80427b22fdb

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