Machine Learning Quick Start
Ciaren has built-in nodes for the tabular ML lifecycle (clean, split, train with preprocessing, predict, evaluate) on the same canvas as the rest of your flow. Models are tracked with MLflow. This guide builds a churn classifier in about 10 minutes.

Prerequisites
None. A plain pip install ciaren includes scikit-learn, MLflow and joblib,
and ciaren init creates a local MLflow store (./mlruns) and enables ML. Run
ciaren check and look for [ok] ml: enabled. If the line is missing or the
Machine Learning palette section is empty, CIAREN_ML_ENABLED may be set to
false or the install is stripped down.
pip install "ciaren[ml]" adds XGBoost and LightGBM to the model choices. To
use an existing MLflow server, see MLflow and the Models Page.
ML pipeline at a glance
- 1InputFile Inputchurn dataset
- 2MLTrain /
Test Split seed + stratify - 3MLTrain Classifierpreprocessing + Random Forest →
MLflow - 4MLPredicttest output + model wire
- 5MLEvaluateaccuracy, AUC, F1
- 6OutputFile Outputsave metrics
Purple model wire
Train / Test Split has two output handles: train feeds Train Classifier
and test feeds the data input of Predict. Train Classifier's bundled
preprocessing fits on the training rows and travels with the model. Its model
output connects to Predict's model input with a purple wire.
The nodes
Open a flow and expand Machine Learning in the node palette:
| Node | What it does |
|---|---|
| Train / Test Split | Splits rows into train and test outputs (seed required). |
| Scale Features | Fit scaling on the incoming frame for exploration. |
| Encode Categories | Fit one-hot or ordinal encoding on the incoming frame. |
| Select Features | Keep columns by variance, correlation or top-K relevance. |
| Reduce Dimensions | Fit PCA and replace selected numeric columns with components. |
| Classifier Model / Regressor Model | Define an unfitted estimator for Cross-Validate. |
| Train Classifier / Train Regressor | Fit a final model artifact and log it to MLflow. |
| Train Clustering | Fit K-Means, DBSCAN or Agglomerative Clustering; only K-Means supports Predict on new rows. |
| Train Dim. Reduction | Save a fitted PCA pipeline; use Reduce Dimensions for a components table in the flow. |
| Train Forecaster | Scaffold with no built-in forecasting estimator; check availability before using it. |
| Predict | Score rows with a trained model. |
| Evaluate | Compute metrics from predictions. |
| Feature Importance | Rank which features the model relied on. |
| Cross-Validate | Estimate generalization from a Classifier / Regressor Model definition with k-fold, stratified, time-series, group, or other CV strategies. |
Model definitions vs. trained models
Use Classifier Model or Regressor Model before Cross-Validate. These nodes only describe the algorithm, target, features, hyperparameters, and preprocessing; Cross-Validate then fits fresh clones inside each fold.
Use Train Classifier or Train Regressor after you have chosen a model and need a final trained artifact for Predict, Feature Importance, model registration, or MLflow tracking. Train nodes are intentionally not accepted by Cross-Validate, because that would train one full-data model and then train fold models again.
Keep preprocessing with the trained model
Scale Features and Encode Categories are useful for exploration, but refit on each input. Independently fitting them on train and test branches changes the feature representation. For this training flow, configure scaling, imputation and categorical encoding in Train Classifier's Advanced → Preprocessing. Predict then applies those fitted steps to the raw test rows. Standalone feature selection and PCA are not added to the model automatically; retain fitted steps in your own exported pipeline when you need them.
Build the flow
- Input: drag a File Input, set File type to CSV, and pick your dataset
(it needs a target column, e.g.
churn). - Train / Test Split: connect the input. Set a seed (required for reproducibility) and, for classification, stratify on your target.
- Train Classifier: connect the split's train output.
- Pick a Model (grouped by task). Random Forest is a solid default.
- Choose the Target column (
churn). Empty Feature columns uses every other column. For the customer sample, choosetenure,monthly_chargesandsupport_calls, leaving out the ID. - Tweak basic hyperparameters inline, or open Advanced options for the full set, tracking, and preprocessing.
- Predict: connect the split's test output to its data input, and the Train Classifier's model output (the purple wire) to its model input.
- Evaluate: connect Predict. Set the task type and the prediction column
(
prediction); choose metrics or accept the defaults. - Output: connect a File Output to Evaluate to save the metrics table.
Prefer to describe it?
With a provider key set up, the Flow assistant can propose a flow like this from a request such as "train a random forest with 5-fold cross validation and show feature importance". You review the nodes, settings and wiring before saving, and training starts only when you choose Run. The assistant does not add forecasting models. Build those by hand.
What travels on a model wire
A model wire never carries the model itself. Train nodes save the fitted
estimator to MLflow and pass a small model reference downstream: the
MLflow run or model URI plus the task, model type, target and feature columns.
Predict and Feature Importance read the reference and load the artifact
themselves. Production flows can instead put a registry alias URI such as
models:/churn@production in Predict's config (see
MLflow and the Models Page).
Loading checks the URI and confines local artifacts to the artifact directory, but that is not a sandbox: MLflow and joblib models can run Python while loading, so load only artifacts you trust.
Models from plugins
Plugins can contribute additional algorithms to the model picker. They appear
in the same dropdown, grouped by task, and train/log/export exactly like the
built-ins (a warning shows if the plugin's library isn't installed). Plugins can
also ship whole custom train nodes whose model output feeds Predict like any
other. Try the bundled MLP Classifier example from the Plugins page, or see
ML Model Plugins to build your own.
Add cross-validation
To estimate generalization before training the final artifact:
- Add Classifier Model or Regressor Model.
- Configure the same model type, target, features, preprocessing, and hyperparameters you want to evaluate.
- Connect the data frame to Cross-Validate's
ininput. - Connect the model definition node's
modeloutput to Cross-Validate'smodelinput.
Cross-Validate returns one row per fold and can end the flow by itself. After you pick the best setup, use Train Classifier or Train Regressor in a final training flow to create the model artifact used by Predict or registration.
Run it and read the results
Run the flow, then open the run. The run detail page shows the full DAG with green checkmarks on every node and row counts at each step:

Click the Train Classifier node to see its Machine learning panel:
- training metrics,
- a confusion-matrix heatmap (classification),
- the model URI and MLflow run id,
- a Register in registry button to promote the model; see MLflow and the Models Page.
Click the Evaluate node for the held-out test metrics, and Feature Importance (wire it to the model output) for an importance bar chart.
Try the demo flows
With ML enabled (the default), the built-in Demo project includes nine
ready-to-run ML flows: the four tutorial flows above
(Iris — Quick Classifier, Iris — Train, Validate & Evaluate,
House Prices — Regression, Iris — PCA Explore) plus five more covering
cross-validation, KNN with encoded features, feature selection, and clustering
(Iris — Logistic CV Report, Iris — KNN with Encoded Species,
House Prices — Feature Selection, House Prices — Customer Segments,
House Prices — PCA Model). Boot with
ciaren serve --run-seed-flows to run them all once on first start, so the
Runs history and the Models page are populated out of the box.
Next steps
- ML node reference
- MLflow and the Models Page: tracking store, registry, aliases, and the Models page.
- Scheduling: retrain on a cron schedule.
- Engines: ML steps run on numpy; the rest of the flow keeps its chosen engine.