Skip to content

Latest commit

 

History

4 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Mini-AutoML Pipeline Tool

Python Version Streamlit Scikit-Learn

OverviewFeaturesGetting startedUsageProject Structure

Mini-AutoML is a lightweight, easy-to-use Automated Machine Learning framework that automatically preprocesses data, trains multiple models, and selects the best one based on your chosen metric.

Note

This tool is designed for rapid prototyping and educational purposes. It currently supports basic regression and classification tasks using Scikit-Learn.

Overview

Building machine learning pipelines from scratch involves a lot of repetitive boilerplate code for data imputation, scaling, encoding, and model selection. Mini-AutoML simplifies this by providing an end-to-end automated pipeline.

It evaluates baseline models (Logistic/Linear Regression, Random Forest, KNN) using GridSearchCV and exports the winning model as a ready-to-deploy .joblib pipeline. You can interact with it via an interactive Web App, a Command Line Interface (CLI), or programmatically via the Python API.

Features

  • Automated Preprocessing: Infers column types, drops columns with massive missing data, imputes missing values, scales numerical features, and one-hot encodes categorical features.
  • Model Training: Evaluates various baseline models depending on the task type (Classification or Regression).
  • Hyperparameter Tuning: Utilizes GridSearchCV to find the best configuration for the winning model.
  • Interactive Prediction: Once the pipeline completes, input new unseen data to get predictions via the Streamlit Web UI.
  • Easy Export: The best pipeline is seamlessly exported into the models/ directory for deployment.

Getting started

You need to have Python 3.8+ installed on your local machine.

  1. Clone the repository (if applicable) and navigate to the project directory.
  2. Create and activate a virtual environment:
    python -m venv .venv
    source .venv/bin/activate  # On macOS/Linux
    # .venv\Scripts\activate   # On Windows
  3. Install dependencies:
    pip install -r requirements.txt

Usage

Mini-AutoML comes equipped with three convenient ways to interact with it.

1. Interactive Web App (Streamlit)

The most user-friendly way to use the tool is via the built-in Streamlit dashboard.

GUI Preview

streamlit run app.py

Tip

After running the pipeline in the Web App, navigate to the Predict tab to dynamically test your new model with custom inputs!

2. Command Line Interface (CLI)

Prefer working from the terminal? You can use cli.py to run the end-to-end pipeline.

CLI Preview

# View help and options
python cli.py --help

# Run a classification task
python cli.py data/iris.csv --target species --task classification

# Run a regression task with a custom export path
python cli.py data/Housing.csv --target price --task regression --export models/my_model.joblib

3. Python API (Programmatic)

You can easily integrate Mini-AutoML directly into your custom Python scripts or Jupyter Notebooks.

import pandas as pd
from src.automl import AutoML

# Initialize the AutoML engine
automl = AutoML(
    target_column="target_name", 
    task_type="classification" # or 'regression'
)

# Run the pipeline and save the best model
automl.fit("dataset.csv", export_path="models/best_model.joblib")

# View the evaluation report
print(automl.get_report())

Project Structure

  • app.py: Streamlit Web Application
  • cli.py: Command Line Interface
  • example.py: Programmatic usage examples
  • requirements.txt: Python dependencies
  • src/
    • automl.py: Core AutoML orchestration class
    • data_processor.py: Data ingestion, splitting, and cleaning
    • preprocessor.py: Scikit-learn Pipeline construction
    • trainer.py: Model training and hyperparameter tuning
    • utils.py: Logging and reporting utilities

About

Mini-AutoML is a lightweight, easy-to-use Automated Machine Learning framework that automatically preprocesses data, trains multiple models, and selects the best one based on your chosen metric.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Contributors

Languages