Skip to content

ParleML ML4: automated machine learning

In short

  • ml4 is the training engine inside ParleML. It turns a table into a deployable model: feature engineering, training on AutoGluon, then calibration, thresholds and honesty checks.
  • It covers seven kinds of work: classification, regression, forecasting, anomaly detection, clustering, recommendation and learning-to-rank, and association rules.
  • In the ParleML app you use it without code. This site is for the Python library: start with the Quickstart.
  • mli is its partner: ml4 builds the model, mli explains it.

What it looks like

import parleml_ml4

cfg = parleml_ml4.Ml4Config()
cfg.data.target_column = "churned"            # the column you want to predict
model = parleml_ml4.AutoSupervised(cfg).fit(train_df)  # plan features, train, fit the post-fit layers
risk = model.predict_proba(new_customers)      # one column per class
model.save("out/churn")

fit returns a FittedPipeline: the trained model plus everything it needs to score new rows. It follows the scikit-learn convention (predict, predict_proba), so it drops into existing code.

Pick your path

One entry point per kind of work

Task Entry point Import
Classification and regression AutoSupervised import parleml_ml4 → parleml_ml4.AutoSupervised
Time-series forecasting Forecaster from parleml_ml4.forecasting import Forecaster
Anomaly detection AnomalyDetector from parleml_ml4.unsupervised import AnomalyDetector
Clustering ClusteringDetector from parleml_ml4.unsupervised import ClusteringDetector
Recommendation (next best product) Recommender from parleml_ml4.recommendation import Recommender
Learning-to-rank LTRRanker from parleml_ml4.ltr import LTRRanker
Association rules (market basket) AssociationMiner from parleml_ml4.association import AssociationMiner

Why ml4

  • AutoGluon inside, ml4 around it. AutoGluon Tabular trains and ensembles the models. ml4 adds what AutoGluon does not have: a leakage-safe feature-engineering recipe, a roster for regulated models, and a post-fit layer (calibration, threshold tuning, prediction intervals, a baseline check). Hyperparameter search has one owner you choose: ml4's Optuna search, AutoGluon's, or good defaults with no search.
  • Seven workloads, each a real pipeline. Forecasting has four backends (statistical, tree, the Chronos foundation model and AutoGluon-TimeSeries) with per-series validation, a seasonal-naive check and conformal intervals. Clustering fuses structured columns with text embeddings. Anomaly detection runs a curated PyOD roster. Recommendation and learning-to-rank share one ranking report. Association rules are filtered for statistical significance.
  • Domain-aware features. Parsers turn raw signals into features: IP addresses and geography, emails, names, user agents, addresses, postal codes, phone numbers, URLs, devices, dates, and card, IBAN and VAT numbers. Stateful encoders include eight target-encoding schemes, contrast codings, tree-guided interactions, text encoders and neural embeddings. See the full suite.
  • Leakage-safe on both sides of the fold. Target-aware features are refitted inside every fold, and each training row is encoded by a fit that never saw its own label. See the details below.
  • Ready for regulated work. A glass-box roster (GLM, scorecard, RuleFit, EBM), monotonic constraints derived automatically for the tree boosters, and presets named for the job: regulated_glassbox, regulated_monotonic, regulated_scorecard.
  • Tabular foundation models. TabICL, a model that predicts without training, competes on the leaderboard as a foundation challenger. It also powers the Signal check, which tells you in seconds whether a dataset holds learnable signal.
  • Honest numbers. Calibration ships only when it beats the raw probabilities out of sample. The decision threshold is tuned to your metric. A baseline check flags no_signal, worse_than_constant and suspected_leakage. Regression gets calibrated prediction intervals.
  • Fast scoring. An opt-in Treelite accelerator speeds up single tree-booster models, and an air-gapped pure-Python export scores with no AutoGluon at serve time (the real_time preset). See Inference.
  • MLOps. MLflow logging and registration, Unity Catalog included. See MLOps.
Details: why per-fold refitting is only half the guarantee

Every feature step is typed by how it touches the target, and that type decides where it may run. Unsupervised steps run once, globally. Target-aware steps (target encoders, cross-fitted text, group aggregates) refit once per bagging fold, so a held-out row never influences its own encoding. The check happens when the step is built, not afterwards.

Most tools stop there, and it protects only the validation rows. The training rows are still encoded by a statistic computed from their own labels. On a near-unique key (a customer ID, an email, a transaction ID) the encoded column then is the label: measured at AUC 1.000 against the target on binary, multiclass and regression alike. The model over-trusts it in training and meets a weaker column at validation.

ml4 closes that half too. Each fold runs an inner cross-validation, so every training row's encoding comes from a fit that excluded it, with the same group or time isolation as the outer split. Serving uses the full fit, where there is no label to leak. When no honest inner split exists, the run says so.

Everything the recipe builds is also judged on its own merit: cluster codes, mined interactions, wide text blocks and every encoding are ranked and pruned, not only the raw columns. The survivors feed a second interaction round, so a pair that pays off only once encoded can still be found. See Stateful encoders.

Your data stays with you

ml4 runs on your machine and never calls a language model. Every default is local, including the sentence-transformers embedding model. Data leaves only if you point a text-embedding feature at an external embedding provider (source="provider", through a named connection): the embedded columns are then sent to that provider.

Next