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.1.tar.gz (8.4 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.1-py3-none-any.whl (8.2 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: unslml-0.1.1.tar.gz
  • Upload date:
  • Size: 8.4 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.1.tar.gz
Algorithm Hash digest
SHA256 4ac2f16a0c093ae3d224fb6b4d0fbcdc193939368b5d68ab8c9dc244155fcb04
MD5 4bde7e0286840a401bb05f5d54a534d9
BLAKE2b-256 d3a97ac224198b4d4c43a48659723bc96941c3ee1c011df5c78cc4c40705450f

See more details on using hashes here.

File details

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

File metadata

  • Download URL: unslml-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 8.2 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.1-py3-none-any.whl
Algorithm Hash digest
SHA256 71a082b34a0eeb5bbf2b7c3b43974270babdba1e551f7428f5f70776d08f88b2
MD5 1d3945802467d0758b6d6ebeebc77a60
BLAKE2b-256 1e8de1a6ac085c473fa7512f3cb76de6a1dd1ab3fe4095547692ebe2b35610f8

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