Skip to main content

Simple AutoML library for classification and regression

Project description

UNSLML

A state-of-the-art, robust, and highly accurate AutoML and Machine Learning Library in Python.

unslml automatically detects task types (classification or regression), performs stateful feature engineering, filters extreme outliers, conducts hyperparameter searches, and provides simple one-line model saving and loading.


🌟 Key Features

  • Auto-Task Detection: Automatically detects whether your target is a classification or regression task based on target column datatypes.
  • Smart Numeric Text Parser: Automatically extracts numerical values from string columns that represent measurements or values (e.g., "1200 sqft" -> 1200.0, "42 Lac" -> 4,200,000.0, "1.40 Cr" -> 14,000,000.0).
  • Robust Outlier Filtering: Automatically identifies and filters extreme target outliers in regression (e.g. data entry typos) to prevent metric skew.
  • Stateful Preprocessing: Saves imputations and categorical mapping encodings during training to ensure identical transformation on test/prediction sets.
  • Auto-Hyperparameter Tuning: Performs grid search cross-validation across multiple standard estimators (Logistic/Linear Regression, Decision Trees, Random Forests, KNN).
  • Smart Performance Scaling: Sub-samples extremely large datasets during the parameter search phase to run in seconds rather than hours.
  • Pipeline Serialization (Save & Load): Prompts you to save the entire pipeline state to a .pkl file at the end of training, which can be loaded back with a single line of code.

🚀 Installation

Install the library directly from PyPI using pip:

pip install unslml

💻 How to Use

1. Training & Auto-Saving a Pipeline

Create a script (e.g., train.py) to fit the model. The fitting process automatically runs preprocessing, tunes multiple models, reports evaluation scores, and prompts you to save the best model:

from unslml import AutoML

# Initialize AutoML pipeline
ml = AutoML()

# Fit model (auto-detects task type, handles preprocessing & fits best model)
ml.fit(
    file="house_prices.csv",
    target="Price (in rupees)"
)
# Prompt: "Enter the file path to save the best model (default: best_model.pkl): "

2. Loading & Predicting on Unseen Data

You can load the saved .pkl file (which contains the best model, categorical mappings, and median values) and predict on raw, unprocessed pandas DataFrames:

import pandas as pd
from unslml import AutoML

# Load the entire trained pipeline
ml_loaded = AutoML.load("best_model.pkl")

# New raw sample data to predict
new_houses = pd.DataFrame({
    'location': ['location_name'],
    'Bathroom': [2],
    'Balcony': [1.0],
    'facing': ['North'],
    'Furnishing': ['Semi-Furnished'],
    'Transaction': ['Resale']
})

# Make predictions directly (preprocessing is applied automatically)
predictions = ml_loaded.predict(new_houses)
print("Predicted Prices:", predictions)

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

unslml-0.1.0.tar.gz (4.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

unslml-0.1.0-py3-none-any.whl (4.6 kB view details)

Uploaded Python 3

File details

Details for the file unslml-0.1.0.tar.gz.

File metadata

  • Download URL: unslml-0.1.0.tar.gz
  • Upload date:
  • Size: 4.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.5

File hashes

Hashes for unslml-0.1.0.tar.gz
Algorithm Hash digest
SHA256 273a271a44399c9b99e25e622f12924d4b532df4a41258b1558f86ca95a136ae
MD5 08164f8b5353bcd6cb86584d0fe210cb
BLAKE2b-256 dbb835838d1d8a8748c7b578565ae92901ec20d60bca5469cf71dd99a4a4d17b

See more details on using hashes here.

File details

Details for the file unslml-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: unslml-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 4.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.5

File hashes

Hashes for unslml-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 e40e16bcccb492dc8bff61acfb1d97038a9a82ed4401a81c08983169517cf042
MD5 4c885a0a29dbc1084e292ef622d5a5fa
BLAKE2b-256 178dfe56883c2dbbbb6be05fb87b9fd7ee1bfa639422b5d5e7a4410255d891f1

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