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
.pklfile 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
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file unslml-0.1.2.tar.gz.
File metadata
- Download URL: unslml-0.1.2.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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
901584a049d8b1bfa5d1a137249067ec6d54aba7a4fdb7b63b72918f3ea72525
|
|
| MD5 |
db24c9ade688c0e2870d199562ffc3fa
|
|
| BLAKE2b-256 |
a6276063bc91afd97c32fc8f6e00f52b420ba5fb234219785b488070e8c0fc33
|
File details
Details for the file unslml-0.1.2-py3-none-any.whl.
File metadata
- Download URL: unslml-0.1.2-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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
68c570bf09fcb7a1326dc7c00cddd194d760ff0213ee6ff8f576817000407ee1
|
|
| MD5 |
a7390a9a47ad6e99ab4888161d56a839
|
|
| BLAKE2b-256 |
83fd1f2a272fbf4b1f882f072c6cf8c8fceef5c0ffc5593ef050a8517f96da21
|