Machine learning for your tabular data
A Python AutoML package to train models, discover features, and explain predictions.
One AutoML to rule them all
New in 1.4: RealMLP, TabM mini, Kumo, and TabICLv2 join the classic algorithms in MLJAR AutoML. Compare three model families through the same Python interface and see their validation results in one leaderboard.
| Model family | Examples | How to get started |
|---|---|---|
| Classic machine learning | Linear models, Random Forest, XGBoost, LightGBM, CatBoost | Included in the base install |
| New neural architectures | RealMLP, TabM mini | Add the optional [realmlp] or [tabm] package extras |
| Tabular foundation models (TFMs) | Kumo, TabICLv2 | Add [tfm]; pretrained models download on first use |
This README describes MLJAR AutoML 1.4.0. See the installation guide for CPU/GPU setup. Optional models run in Compete mode and depend on your hardware and available memory.
See the model comparison example · Read the release notes
Quickstart
In an activated Python virtual environment, install version 1.4.0:
python -m pip install "mljar-supervised==1.4.0"
The compatibility matrix tests Python 3.11, 3.12, 3.13, and 3.14. RC21 also passed isolated local Linux CPU checks on 3.13 and 3.14. Coverage varies by platform and optional backend; see tested environments and CI results. Newer Python versions and free-threaded builds are not automatically covered.
Predict the species of an Iris flower from four measurements. This small dataset comes with scikit-learn, so you can run the example without downloading data. We keep 30 flowers out of training to check the predictions.
from sklearn.datasets import load_iris
from sklearn.metrics import accuracy_score
from sklearn.model_selection import train_test_split
from supervised import AutoML
# Predict the flower species from four measurements.
X, y = load_iris(return_X_y=True, as_frame=True)
X_train, X_test, y_train, y_test = train_test_split(
X, y, test_size=0.2, stratify=y, random_state=42
)
automl = AutoML(
results_path="AutoML_Iris",
mode="Explain",
algorithms=["Baseline", "Decision Tree", "Linear", "LightGBM"],
total_time_limit=120,
n_jobs=2,
)
automl.fit(X_train, y_train)
predictions = automl.predict(X_test)
print(f"Test accuracy: {accuracy_score(y_test, predictions):.1%}")
automl.report() # Creates AutoML_Iris/README.html.
# Save example inputs so the reload example also works in a new Python session.
X_test.head(3).to_csv("iris_new_rows.csv", index=False)
Run this in a new working folder, or use the complete quickstart script. The explicit algorithm list keeps this example on standard CPU models, even if you have optional model packages installed. The training budget is 120 seconds; this small example can finish sooner.
In our recorded 1.4.0b1 runs on Python 3.11 and 3.12, the selected model predicted 29 of 30 held-out flowers correctly (96.7%). This is one small test split, not a general accuracy claim. Recorded output and setup.
See the full recorded output
AutoML directory: AutoML_Iris
The task is multiclass_classification with evaluation metric logloss
AutoML will use algorithms: ['Baseline', 'Decision Tree', 'Linear', 'LightGBM']
AutoML is generating and selecting models automatically. Review outputs before important use.
AutoML will ensemble available models
AutoML steps: ['simple_algorithms', 'default_algorithms', 'ensemble']
* Step simple_algorithms will try to check up to 3 models
1_Baseline logloss 1.098612 trained in 0.29 seconds
2_DecisionTree logloss 0.544928 trained in 3.97 seconds
3_Linear logloss 0.206915 trained in 0.53 seconds
* Step default_algorithms will try to check up to 1 model
4_Default_LightGBM logloss 0.207178 trained in 0.71 seconds
* Step ensemble will try to check up to 1 model
Ensemble logloss 0.111935 trained in 0.78 seconds
AutoML fit time: 12.23 seconds
AutoML best model: Ensemble
Test accuracy: 96.7%
[0 2 1]
Training compares models using validation data. The final test accuracy above uses the separate 30-row test set. The last line shows predictions after reloading the saved model. Times and results can vary between machines.
Open AutoML_Iris/README.html to explore the leaderboard and model reports.
The target labels are 0 (setosa), 1 (versicolor), and 2 (virginica).
Use the saved model
Training saves your models automatically. In a new Python session:
import pandas as pd
from supervised import AutoML
saved_model = AutoML(results_path="AutoML_Iris")
new_rows = pd.read_csv("iris_new_rows.csv")
print(saved_model.predict(new_rows))
The quickstart saves three held-out example inputs to iris_new_rows.csv.
For your own rows, supply the same input columns. Keep the complete
AutoML_Iris directory; shared preprocessing files are needed too.
Use a new results path when starting another training run.
Automatic documentation
See which models were trained and how they performed. Every successful run creates a leaderboard and reports for individual models. Follow a model link to inspect its settings, validation results, and available explanations.
An actual customer-churn report from 1.4.0b1. Open the full report.
Model reports can include feature importance, learning curves, confusion matrices,
and SHAP explanations, depending on the model and explain_level.
Permutation feature importance from the concrete-strength tutorial. Read the model report walkthrough to understand the result.
Need reports in your own workflow? Read them as Markdown, a dictionary, or JSON:
report = automl.report_structured(format="dict")
Explore automatic reports · Model explanations
Feature engineering
Try additional features and check whether they help. AutoML handles missing
values and categorical inputs, can construct numeric combinations with golden
features, and can use feature discovery to propose additional sets of columns.
Feature selection can also test models with fewer inputs.
Golden Features, feature selection, and feature discovery (features-goldmine)
are off by default, including in Compete. Automatic nested validation also
disables feature discovery. To experiment with discovery, explicitly choose
ordinary shuffled cross-validation and keep a separate test set:
# Use your training data in X_train and y_train.
feature_search = AutoML(
results_path="AutoML_Features",
mode="Compete",
total_time_limit=3600,
validation_strategy={
"validation_type": "kfold", "k_folds": 8, "repeats": 1,
"shuffle": True, "stratify": True, "random_seed": 1906,
},
golden_features=False,
features_selection=False,
feature_discovery=True,
)
feature_search.fit(X_train, y_train)
Feature discovery is included in the base installation. In a small synthetic
example, it generated length_mul_width, material_te (target encoding), and
material_freq, among other columns. The saved report records their definitions.
Measured with 1.4.0b1, the same Linear algorithm, and the same validation split. The synthetic target includes a length × width interaction, so this illustrates how generated features can help a linear model. It is not a general benchmark. Reproduce this example.
Feature discovery fits transformations inside training folds and reuses them
for prediction. It currently supports shuffled split and ordinary K-fold
validation; nested, custom, grouped, and time-ordered validation need a different
workflow. Set stratify=False in the example for regression.
Do not enable the legacy Golden Features or feature-selection stages to obtain leakage-free nested scores: they reuse target-selected features across outer folds. Separate fold-local experiments have not been enabled in the defaults.
Golden features · Feature discovery · Feature selection
Compare classic, neural, and foundation models
Use familiar algorithms or add neural and pretrained models. AutoML compares their validation results.
Install the optional backend using the CPU or NVIDIA GPU setup instructions, then select the models you want to compare:
foundation_search = AutoML(
results_path="AutoML_FoundationModels",
mode="Compete",
algorithms=["LightGBM", "Kumo", "TabICLv2"],
total_time_limit=3600,
)
foundation_search.fit(X_train, y_train)
Model weights download on first use. Hardware, memory, task, and sample-weight support differ between backends. Standard CPU examples do not need these extras.
Kumo and TabICLv2 · RealMLP · TabM
Fairness aware training
Measure group differences and evaluate bias mitigation. Supply sensitive features separately and choose the fairness metric that fits your question. AutoML reports group metrics and can train reweighted candidates to try to meet the selected threshold.
# Binary classification; sensitive_train has one row per training example.
# Its columns identify the groups you want to evaluate.
fairness_search = AutoML(
results_path="AutoML_Fairness",
algorithms=["Linear", "LightGBM"],
fairness_metric="demographic_parity_ratio",
fairness_threshold=0.8,
)
fairness_search.fit(X_train, y_train, sensitive_features=sensitive_train)
This synthetic example uses two artificial groups. The ratio compares their positive prediction rates; closer to 1 means more similar rates. Mitigation improved this ratio but lowered accuracy, and the test ratio remained below 0.8. It does not establish fairness for a real application. Recorded setup and results.
With sensitive_features and automatic validation, fairness runs use ordinary
8-fold CV with one repeat, shuffled splits, and seed 1906 in every mode.
Classification is stratified; fold counts decrease only when row or class counts
require it. Explicit non-nested validation settings remain supported; nested
fairness is rejected. Fairness tuning reuses validation results, so reserve an
independent test set for final performance and group metrics.
Binary classification tutorial · Multiclass · Regression
Generate web apps for trained models
Let others make predictions through a web interface. Export a trained model as a Mercury app with inputs for one row or a CSV upload for batch predictions.
# Continue from the trained quickstart model.
automl.app(title="Iris species prediction")
The base package generates the files. Install the optional runtime to run them:
python -m pip install 'mljar-supervised[apps]==1.4.0'
automl.local_app() # Starts the app locally and opens your browser.
When you are ready to publish, use automl.publish_app() or host the generated
files yourself. Publishing is a separate action; generating an app does not put
it online.
Build a prediction app · Classification tutorial · Regression tutorial
Customize your workflow
Choose how models are trained, compared, and evaluated. Set the budget, algorithms, validation strategy, and metric for your problem.
Available modes
| Mode | Starting point for |
|---|---|
Explain |
Exploring data and inspecting model explanations |
Perform |
Training models with a balance of search and prediction cost |
Compete |
A broader model search with sampled nested validation on smaller data and greedy ensembles |
Optuna |
Hyperparameter search with a separate tuning budget per algorithm |
Modes provide defaults; you can override individual settings. The quickstart
uses Explain. See modes and
training stages for details.
How Compete validates and predicts
With automatic validation, the policy depends on the number of training rows:
| Training rows | Validation |
|---|---|
| Fairness enabled (any size) | Ordinary 8-fold cross-validation |
| Fewer than 20,000, without fairness | 8 outer folds; evaluate one seeded split out of 8 inner splits within each outer training partition |
| 20,000 or more, without fairness | Ordinary 8-fold cross-validation |
This is sampled nested validation, not a full 64-fit inner search. Splits are shuffled with seed 1906, and classification is stratified. Each candidate uses the same sampled splits. Fold counts decrease only when row or class counts require it; five minority-class rows mean five outer folds and four possible inner splits, of which one is evaluated per outer fold. Explicit validation settings override this automatic policy.
For nested candidates, the reported validation score is the mean of the evaluated inner scores. Each outer partition selects its training duration using inner validation, refits on all outer-training rows, and predicts the held-out outer rows. Ensembles use these outer predictions and optimize the mean outer-fold metric, rather than a metric computed once on pooled predictions.
Greedy ensembling runs up to 30 rounds. Adding a new member requires a 1% relative
error reduction; for AUC, error is 1 - AUC. Existing members can receive weight
updates without that admission threshold, and ties prefer existing members.
There is no per-family model cap. Outer scores also select the final standalone
model versus ensemble. Keep a separate test set for the final evaluation.
For new rows, classic and neural models average their outer refits. Kumo and TabICLv2 instead predict using a context containing all training rows. The default TFM search checks Kumo Large with 16 estimators, then Medium and Small with 8 each; TabICLv2 uses 8 estimators. Explicit configurations remain available, and hardware, memory, and the shared time budget constrain which candidates finish. Stacking is disabled on the nested path.
Keep related rows together
For repeated measurements of the same machine, customer, or subject, use grouped validation. Pass split indices relative to your training rows:
from sklearn.model_selection import GroupKFold
folds = list(GroupKFold(n_splits=3).split(X_train, y_train, groups=train_groups))
grouped_model = AutoML(
results_path="AutoML_Grouped",
validation_strategy={"validation_type": "custom"},
golden_features=False,
feature_discovery=False,
)
grouped_model.fit(X_train, y_train, cv=folds)
Reserve a separate group-safe test set before this step. Run the complete grouped or time-ordered example.
Use your own metric
Pass a function accepting targets, predictions, and optional sample weights. AutoML minimizes its result:
import numpy as np
def underprediction_cost(y_true, y_predicted, sample_weight=None):
error = np.asarray(y_true).ravel() - np.asarray(y_predicted).ravel()
cost = np.where(error > 0, 2 * error, -error)
return np.average(cost, weights=sample_weight)
custom_model = AutoML(
results_path="AutoML_CustomMetric",
ml_task="regression",
eval_metric=underprediction_cost,
)
This example gives underestimates twice the cost of equal-sized overestimates. For a score where higher is better, return its negative value. Custom metric guide · Full API reference
Examples
Start with a question similar to yours. Each tutorial includes a standalone script, a notebook, dataset attribution, measured results, and real reports.
| Predict a number from a CSV | Predict which customers may leave |
|---|---|
| Start here · Engineering · Regression | Start here · Business · Classification |
| Estimate concrete strength from ingredients and age. Learn to measure error in MPa and keep related measurements together. | Estimate churn probabilities from service usage. Understand missed customers, false alarms, and a fixed decision threshold. |
| Read the tutorial · Script · Notebook | Read the tutorial · Script · Notebook |
Both scripts and notebooks passed on Python 3.11 and 3.12 with published
mljar-supervised==1.4.0b1. Their tutorials record the environments, evaluation
protocols, runtime, memory measurements, and reload checks. Results from one
historical split are not promises about another dataset or machine.
Browse the gallery and advanced guides.
Installation
Install the base package or add the extras needed for your workflow. Recorded tutorial results retain their original 1.4.0b1 version and environment details.
| Install 1.4.0 | Additional capabilities |
|---|---|
python -m pip install 'mljar-supervised==1.4.0' |
Standard algorithms, reports, and feature discovery |
python -m pip install 'mljar-supervised[realmlp]==1.4.0' or 'mljar-supervised[tabm]==1.4.0' |
Shared RealMLP/TabM backend dependencies |
python -m pip install 'mljar-supervised[tfm]==1.4.0' |
Kumo/TabICLv2 backend; weights download on first use |
python -m pip install 'mljar-supervised[apps]==1.4.0' |
Runtime for generated prediction apps |
python -m pip install 'mljar-supervised[all]==1.4.0' |
All optional model backends |
python -m pip install 'mljar-supervised[all,apps]==1.4.0' |
Optional model backends and app runtime |
The package requires Python 3.11+. Local Linux CPU checks passed on 3.13 and 3.14; that does not establish support for every platform, CUDA build, or free-threaded interpreter. See the compatibility checks and their CI results before choosing a release environment.
For Torch-based extras, choose a compatible CPU or CUDA PyTorch build first. See the installation guide for exact commands, aliases, platform limitations, and native-runtime compatibility checks. The base package does not require Torch or Mercury. Conda-forge releases are maintained separately.
FAQ
- How do I save and reload? Models are saved in
results_path. Keep the complete directory; see save and load. - Can I choose classification or regression explicitly? Set
ml_task. See the API reference for supported values. - How do I identify probability columns? Use
predict_all()to inspect the class-labelled prediction columns. Their order matchespredict_proba();predict_all()also includes the predicted label. - How is tuning configured? See AutoML stages
and the API reference, including
optuna_init_paramsfor reusing Optuna parameters.
Documentation
Documentation website · Example gallery · API reference · Get help · Release notes · Report an issue
For a walkthrough with real outputs, follow the concrete-strength tutorial or customer-churn tutorial.
Contributing
Read the contribution guide and test instructions. Thanks to everyone who has contributed.
Cite
If you use MLJAR AutoML in your research, please cite:
@inproceedings{plonska2026mljar,
title = {{MLJAR AutoML}: Transparent and Fairness-Aware {AutoML} for Tabular Data with Automatic Documentation},
author = {P{\l}o{\'n}ska, Aleksandra and P{\l}o{\'n}ski, Piotr},
booktitle = {Proceedings of the Fifth International Conference on Automated Machine Learning},
series = {Proceedings of Machine Learning Research},
publisher = {PMLR},
year = {2026},
note = {To appear},
url = {https://openreview.net/forum?id=MeGWjXDu0q}
}
License
MLJAR AutoML is available under the MIT license. Example datasets and optional model weights have their own licenses, documented with their sources.
Built on the shoulders of giants. Meet the projects and people behind AutoML in our Credits.
Commercial support
For implementation or commercial support, contact MLJAR.
MLJAR
Created by MLJAR. Explore MLJAR Studio for a conversational notebook interface.
Metadata
Release files for mljar-supervised 1.4.0
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 | Actions |
|---|---|---|---|---|
| mljar_supervised-1.4.0.tar.gz | 284.0 kB | Without provenance | Details for mljar_supervised-1.4.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| mljar_supervised-1.4.0-py3-none-any.whl | Python 3 | none | any | Details for mljar_supervised-1.4.0-py3-none-any.whl |
Total release size: 625.5 kB
Release files / mljar_supervised-1.4.0.tar.gz
| Download URL | mljar_supervised-1.4.0.tar.gz |
|---|---|
| Size | 284.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
d1470213b3280abfac2ed792b4ae1697f8ada74c1b10196a203b1e75f86159df
|
|
BLAKE2b-256 checksum How to use checksums |
701eecffd751392a4ef8243421fbaa5a34e25d217feb79ada604fbeef89f24fc
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.11.10
|
Release files / mljar_supervised-1.4.0-py3-none-any.whl
| Download URL | mljar_supervised-1.4.0-py3-none-any.whl |
|---|---|
| Size | 341.4 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
f70eb94575fa283691ce750db2f71599b1d9dc61adabd769275b97057cdeb822
|
|
BLAKE2b-256 checksum How to use checksums |
92b5b84e8ced1138c1f60b4a61152e10b94fbe5442dd26f0fe6a840c37bfafea
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.11.10
|
Security for mljar-supervised 1.4.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.
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.
To learn more about protecting yourself from malicious actors, visit our package security documentation.