Skip to main content
mlforgex Logo

Automated Machine Learning utility for streamlined training, evaluation, and prediction.



PyPI version Python versions License Stars Documentation GitHub Repository PyPI Downloads Listed in Awesome Machine Learning



Effortlessly scale your ML workflows with built-in preprocessing, hyperparameter tuning, ensembling, and an interactive dashboard.


🚀 What is mlforgex?

mlforgex is a lightweight, high-performance automated machine learning (AutoML) utility designed to drastically reduce boilerplate code. Whether you're working on Regression, Classification, or Natural Language Processing (NLP) tasks, mlforgex handles everything from data cleaning and scaling to advanced hyperparameter tuning and model ensembling.

With just a few lines of code, you get a fully trained pipeline and a beautiful interactive HTML dashboard of your model's performance.

✨ Key Features

  • 🧠 End-to-End AutoML: Automatically detects the problem type (Regression or Classification) and trains the best-in-class algorithms (XGBoost, LightGBM, CatBoost, Random Forest, etc.).
  • 🧹 Intelligent Preprocessing: Built-in outlier removal, skewness handling, highly-correlated feature dropping, and one-hot/ordinal encoding.
  • ⚖️ Imbalance Handling: Automatically detects and handles mild to severe class imbalances using Random Under-sampling or SMOTETomek.
  • 📝 Native NLP Support: Processes text data natively—tokenization, stopword removal, lemmatization, and Word2Vec embeddings out-of-the-box.
  • 🚀 Advanced Ensembles: Automatically constructs Stacking and Voting ensembles from the top-performing tuned models to maximize accuracy and minimize overfitting.
  • 📊 Interactive Dashboards: Generates comprehensive Plotly-based HTML dashboards with feature importance, correlation heatmaps, and metric curves (ROC, Precision-Recall).

📦 Installation

mlforgex is available on PyPI. Install it using pip:

pip install mlforgex

(Requires Python 3.8 or higher)

⚡ Quick Start

mlforgex makes training highly optimized models incredibly simple. Just provide the path to your dataset and the name of the target column.

Training a Model

from mlforgex.train import train_model

# Train a model for Classification or Regression automatically
train_model(
    data_path="data/dataset.csv",
    dependent_feature="target_column",
    n_iter=100,               # Number of randomized search iterations
    fast=False,               # Set to True for a quick baseline
    artifacts_dir="output",   # Directory to save models and dashboard
    dashboard_title="My Project Dashboard"
)

Training an NLP Model

from mlforgex.train import train_model

# Enable NLP mode for text classification
train_model(
    data_path="data/reviews.csv",
    dependent_feature="sentiment",
    nlp=True,                 # Turn on NLP processing
    artifacts_dir="nlp_output"
)

Making Predictions

Once trained, mlforgex saves a model.pkl and preprocessor.pkl inside your artifacts directory.

import pandas as pd
from mlforgex.predict import predict_data

# Load new unseen data
new_data = pd.read_csv("data/new_data.csv")

# Generate predictions using the saved artifacts
predictions = predict_data(
    data=new_data,
    artifacts_path="output/artifacts"
)

print(predictions)

📈 Interactive Dashboard

After every training run, mlforgex automatically generates a Dashboard.html in your artifacts folder. Open it in any web browser to explore:

  • Data insights and distribution shapes.
  • Correlation heatmaps.
  • Feature importances.
  • Interactive evaluation metric curves (e.g., ROC-AUC, Learning Curves).

🛠 Command Line Interface (CLI)

You can also use mlforgex directly from the terminal!

# Train a model
mlforgex-train --data my_data.csv --target price --out_dir my_models

# Make predictions
mlforgex-predict --data unseen.csv --artifacts my_models/artifacts

📘 Documentation

For advanced usage, custom thresholds, and API references, check out the full documentation:

👉 mlforgex Official Documentation

🤝 Contributing

Contributions are welcome! Please feel free to submit a Pull Request. If you find a bug or have a feature request, please open an issue.

  1. Fork the Project
  2. Create your Feature Branch (git checkout -b feature/AmazingFeature)
  3. Commit your Changes (git commit -m 'Add some AmazingFeature')
  4. Push to the Branch (git push origin feature/AmazingFeature)
  5. Open a Pull Request

📄 License

Distributed under the MIT License. See LICENSE for more information.


Made with ❤️ by Priyanshu Mathur

Metadata

Release files for mlforgex 1.2.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for mlforgex 1.2.0
File Size Uploaded Provenance Actions
mlforgex-1.2.0.tar.gz 42.0 kB With provenance Details for mlforgex-1.2.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for mlforgex 1.2.0
File Interpreter ABI Platform Actions
mlforgex-1.2.0-py3-none-any.whl Python 3 none any Details for mlforgex-1.2.0-py3-none-any.whl

Total release size: 83.1 kB

Release files / mlforgex-1.2.0.tar.gz

Download URL mlforgex-1.2.0.tar.gz
Size 42.0 kB
Tags Source
SHA-256 checksum
How to use checksums
d68bec65310be8879b3f24b7ab28bc05333e97ddaf0bdda5ff44e369eb4479f8
BLAKE2b-256 checksum
How to use checksums
14616873d7b8689cab041bdffe7a85f614f479b4141cc1473758b33e41f17110
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.12

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Jul 15, 2026.

Transparency log

Release files / mlforgex-1.2.0-py3-none-any.whl

Download URL mlforgex-1.2.0-py3-none-any.whl
Size 41.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
436a1f36f5204fd38947e25b7c840524e127351cc2a6c9e913f6f5d0f630b6bf
BLAKE2b-256 checksum
How to use checksums
377e771fa2efc83e2353eae227fa5d618f3b1ae2e233328fb28b1da2f1d748b4
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.12

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Jul 15, 2026.

Transparency log

Security for mlforgex 1.2.0

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.

Full provenance

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for mlforgex-1.2.0.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Jul 15, 2026.

Transparency log

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.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page