Auto ML Processor
A Python package for automated machine learning preprocessing and model training. This package streamlines common data preprocessing tasks and model training for classification and regression problems.
Features
- Automated data loading from multiple sources:
- Local files (CSV, Excel, JSON, Parquet, Feather, Pickle)
- URLs (direct downloads with format detection)
- Hugging Face datasets
- Kaggle datasets
- OpenML datasets
- Intelligent missing value handling with configurable thresholds
- Automatic feature type detection (categorical vs. numerical)
- Standardized preprocessing pipeline for feature engineering
- Built-in model training for common algorithms (XGBoost, KNN, Random Forest)
- Simple evaluation and saving of models
- One-line full processing option for quick execution
Installation
pip install auto-ml-processor
Quick Start
from auto_ml_processor import AutoMLProcessor
# Initialize processor
processor = AutoMLProcessor()
# Process data and train model in one line
metrics = processor.full_process(
file_path='your_data.csv',
target_col='target_column',
fill_na_threshold=0.6, # Remove columns with ≥60% missing values
model_name='xgboost'
)
print(f"Model performance: {metrics}")
Loading Data from Different Sources
# From a URL
processor.load_data(
'https://archive.ics.uci.edu/ml/machine-learning-databases/iris/iris.data',
source_type='url'
)
# From Hugging Face datasets
processor.load_data(
'mnist',
source_type='huggingface',
split='train' # Load the training split
)
# From Kaggle
processor.load_data(
'uciml/iris',
source_type='kaggle',
download_path='./kaggle_data'
)
# From OpenML
processor.load_data(
'iris', # Dataset name or ID
source_type='openml'
)
Step-by-Step Usage
# Initialize
processor = AutoMLProcessor(verbose=True)
# Load data
df = processor.load_data('dataset.csv')
# Handle missing values
processor.handle_missing_values(fill_na_threshold=0.6)
# Prepare data
processor.prepare_data(target_col='target', test_size=0.2)
# Train model
processor.train_model(model_name='knn')
# Evaluate
metrics = processor.evaluate_model()
# Save model
processor.save_model('output_directory')
Making Predictions
# Load saved model
loaded_processor = AutoMLProcessor.load_model('output_directory')
# Make predictions on new data
import pandas as pd
new_data = pd.read_csv('new_data.csv')
predictions = loaded_processor.predict(new_data)
Second Stage
Handling Categorical Targets
The package automatically detects and encodes categorical target variables:
# Process Iris dataset with categorical target (species)
processor = AutoMLProcessor()
metrics = processor.full_process(
file_path='https://archive.ics.uci.edu/ml/machine-learning-databases/iris/iris.data',
source_type='url',
target_col=4, # The Iris species column (last column)
model_name='random_forest'
)
# Predictions are automatically converted back to original labels
new_data = pd.DataFrame({
0: [5.1, 3.5, 1.4, 0.2], # Features for a new sample
1: [4.9, 3.0, 1.4, 0.2],
2: [7.0, 3.2, 4.7, 1.4]
})
predictions = processor.predict(new_data)
print(f"Predicted species: {predictions}") # Shows "Iris-setosa", etc.
```# Auto ML Processor
A Python package for automated machine learning preprocessing and model training. This package streamlines common data preprocessing tasks and model training for classification and regression problems.
## Key Features
- **Automated data loading** from multiple sources
- **Intelligent missing value handling** with configurable thresholds
- **Automatic feature type detection** (categorical vs. numerical)
- **Automatic target variable encoding** for categorical targets
- **Standardized preprocessing pipeline** for feature engineering
- **Built-in model training** for common algorithms (XGBoost, KNN, Random Forest)
- **Simple evaluation and saving** of models
- **One-line full processing** option for quick execution
## Installation
```bash
pip install auto-ml-processor
Quick Start
from auto_ml_processor import AutoMLProcessor
# Initialize processor
processor = AutoMLProcessor()
# Process data and train model in one line
metrics = processor.full_process(
file_path='your_data.csv',
target_col='target_column',
fill_na_threshold=0.6, # Remove columns with ≥60% missing values
model_name='xgboost'
)
print(f"Model performance: {metrics}")
Loading Data from Different Sources
# From a URL
processor.load_data(
'https://archive.ics.uci.edu/ml/machine-learning-databases/iris/iris.data',
source_type='url'
)
# From Hugging Face datasets
processor.load_data(
'mnist',
source_type='huggingface',
split='train' # Load the training split
)
# From Kaggle
processor.load_data(
'uciml/iris',
source_type='kaggle',
download_path='./kaggle_data'
)
# From OpenML
processor.load_data(
'iris', # Dataset name or ID
source_type='openml'
)
Step-by-Step Usage
# Initialize
processor = AutoMLProcessor(verbose=True)
# Load data
df = processor.load_data('dataset.csv')
# Handle missing values
processor.handle_missing_values(fill_na_threshold=0.6)
# Prepare data
processor.prepare_data(target_col='target', test_size=0.2)
# Train model
processor.train_model(model_name='knn')
# Evaluate
metrics = processor.evaluate_model()
# Save model
processor.save_model('output_directory')
Making Predictions
# Load saved model
loaded_processor = AutoMLProcessor.load_model('output_directory')
# Make predictions on new data
import pandas as pd
new_data = pd.read_csv('new_data.csv')
predictions = loaded_processor.predict(new_data)
License
MIT License
Metadata
Release files for auto-ml-processor 0.1.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| auto_ml_processor-0.1.2.tar.gz | 11.2 kB | Without provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| auto_ml_processor-0.1.2-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 21.1 kB
Release files / auto_ml_processor-0.1.2.tar.gz
| Download URL | auto_ml_processor-0.1.2.tar.gz |
|---|---|
| Size | 11.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
97bac702bbf0d118ac5f07f609831fff9cb68db69fceded004451d3f898ad827
|
|
BLAKE2b-256 checksum How to use checksums |
824e926b3c45b4fd431828c9b07619eed16653df326ed360aa24aebfcac49ede
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.9.21
|
Release files / auto_ml_processor-0.1.2-py3-none-any.whl
| Download URL | auto_ml_processor-0.1.2-py3-none-any.whl |
|---|---|
| Size | 9.9 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
b685185d875041f19e28bbcda81b19aee0281ba32c459f73539bb25556381edd
|
|
BLAKE2b-256 checksum How to use checksums |
42faa013664d8e384072c3098c9430ba454c83c28cd680b896ac03d36baaf38e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.9.21
|
Security for auto-ml-processor 0.1.2
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.