Skip to content

Machine Learning

Flow-Like turns classical machine learning into an inspectable flow: prepare the data, fit the model, measure it, save it, and replay the same contract at prediction time. The important choices stay visible as nodes instead of disappearing inside a notebook.

A label-free Flow-Like machine-learning system connecting tabular data, splitting and preprocessing to a central model, task families, evaluation, model storage, and predictions

Browse the Machine Learning node catalog for the complete pin schemas and defaults of every node named here.

Start with the target column, not the algorithm.

A Flow-Like decision map that routes unordered labels to classification, ordered levels to ordinal learning, continuous numbers to regression, missing targets to clustering, and normal-only examples to novelty detection

The target looks likeTaskDeciding test
Names with no inherent orderClassificationReordering the labels changes nothing about the problem
Levels with an orderOrdinalBeing off by two levels is worse than being off by one
A continuous numberRegressionThe difference between 10 and 12 means the same as between 100 and 102
No target columnClusteringYou want groups, but nothing supplies the correct groups
No target column, and the columns themselves are the problemDimensionality reductionYou want fewer, denser columns or a two-dimensional picture, not row groups
Only examples of normal behaviourNovelty detection with One-Class SVMNew rows should be flagged as inliers or outliers

A classifier discards the order of the levels, so predicting low when the truth is high costs it exactly as much as predicting medium. A regressor does the opposite and invents distances the levels do not carry — high is not exactly twice medium. If your target is a rating, severity grade, tier, or Likert answer, start in the Ordinal family.

If a five-star review predicted as one star is a worse mistake than one predicted as four, the order carries information and a classifier will throw it away.

Ordinal trainers need to know which level is lowest. Numeric labels order numerically — integers are parsed before floats, so "1", "2", "10" sorts 1 < 2 < 10, not lexicographically. Non-numeric labels have no inferable order, so training fails rather than guessing: supply the Class Order pin as a comma-separated list, lowest first (low, medium, high). Each trainer reports back the order it actually used, and whether it came from your list or from reading the labels as numbers. Check that output first whenever an ordinal model behaves oddly.

The ONNX inference family runs compatible models that were trained elsewhere and exported to ONNX. Validate the model’s expected tensors and reproduce its preprocessing exactly.

Start with the simplest model that matches the target and constraints. Compare alternatives on the same untouched evaluation set; a more complex model earns its place only when it improves the metric that matters.

ModelNodePick it whenWatch out for
Decision TreeTrain Classifier (Decision Tree)You need rules a person can read and defendUnlimited depth memorizes the training set; set Max Depth or Min Samples Leaf
Random ForestTrain Classifier (Random Forest)You want the strongest tabular baseline with little tuningSize and fit time grow linearly with ensemble size, and a fixed seed still does not make fits bit-identical across processes
AdaBoostTrain Classifier (AdaBoost)The signal is weak and one tree underfitsFar more sensitive to label noise and outliers than Random Forest, and equally non-reproducible bit-for-bit
Logistic RegressionTrain Classifier (Logistic Regression)You need calibrated probabilities and readable coefficientsLinear in the features, and the solver needs comparable scales — fit a Feature Scaler first
Gaussian Naive BayesTrain Classifier (Naive Bayes)You want a one-pass baseline to beatAssumes features are independent and roughly normal within each class
Multinomial Naive BayesTrain Classifier (Multinomial Naive Bayes)The input is counts or TF-IDF weights from textFeatures must be non-negative, so centred or standardized vectors are rejected
SVMTrain Classifier (SVM)Classes separate along a non-linear boundary in a modest number of rowsOne-vs-all training builds a dense n×n kernel matrix per class, so memory grows quadratically with rows
K-Nearest NeighboursTrain Classifier (K-Nearest Neighbours)The boundary is irregular and the feature count is smallThe model embeds a verbatim copy of the training set, so personal data in it travels inside every saved model file
One-Class SVMFit Novelty Detection (One-Class SVM)You have normal rows only and want outliers flaggedIt answers inlier or outlier, not which class; Nu bounds the fraction of training rows treated as contaminated
ModelNodePick it whenWatch out for
Linear RegressionTrain Regression (Linear)You want the plainest possible baseline for a continuous targetNo regularization at all, so correlated or numerous features give unstable coefficients
Ridge / Lasso / ElasticNetTrain Regressor (Ridge/Lasso/ElasticNet)There are many features and some are irrelevantThe penalty is scale-dependent, so scale first or the penalty falls unevenly across columns
GLM / TweedieTrain Regressor (GLM / Tweedie)The target is counts, positive skewed amounts, or heavy-tailedThe chosen distribution must match the target; a mismatch can diverge to non-finite coefficients
SVM regressionTrain Regressor (SVM)The target bends non-linearly with the featuresThe solver builds a dense n×n kernel matrix, and there are no coefficients to interpret
K-Nearest NeighboursTrain Regressor (K-Nearest Neighbours)Local averaging beats a global formulaThe model carries the whole training set, and averaging neighbours cannot predict outside the observed target range
ModelNodePick it whenWatch out for
Proportional OddsTrain Ordinal Model (Proportional Odds)Default first choice; you want calibrated per-level probabilities and one readable coefficient vectorOne shared coefficient vector across all cut points is the default assumption — Free Features frees chosen features into one slope per cut point, at the price of a non-zero Crossing Rate — and the gradient fit needs scaled features
Ordinal RidgeTrain Ordinal Model (Ridge)You want a fast closed-form baseline with many levels or many featuresIt returns the level and its latent score, but no calibrated probabilities
Frank & HallTrain Ordinal Model (Frank & Hall)The boundary between levels bends and you want a non-linear base learner on an ordered target: Decision Tree, Random Forest, or Gaussian Naive Bayes when rows are few relative to columnsIt predicts by counting how many of the K−1 cut models say yes, so there are no calibrated probabilities and no coefficient vector
Continuation RatioTrain Ordinal Model (Continuation Ratio)The levels are a sequential process that can halt: escalation tiers, disease stages, funnel depthStricter than the others — every declared level must occur, middle ones included — and higher levels are fitted on fewer rows
Adjacent CategoryTrain Ordinal Model (Adjacent Category)The question is about one step up: ratings, severity grades, Likert answersIts coefficients mean “level k+1 versus level k”, not “at or below cut k”, and the bottom-to-top effect is (K−1) times the per-step effect
Neural CORAL/CORNTrain Ordinal Model (Neural CORAL/CORN)The level is genuinely not monotone in the features and you still need probabilitiesWith no hidden layers CORAL is exactly Proportional Odds with Loss = AllThreshold and Margin = Logistic, and CORN is exactly Continuation Ratio with the logit link, so prefer those for linear problems

The neural node is the only ordinal trainer that is non-linear, probabilistic, and rank-consistent at once. That combination costs a non-convex objective — the seed changes the fit — and far more rows than a linear model. Read its Architecture output, which reports parameter count next to row count, before trusting a training score.

ModelNodePick it whenWatch out for
KMeansTrain Clustering (KMeans)The groups are compact and you can name a cluster countYou must choose k up front, and the distance metric makes unscaled columns dominate
DBSCANTrain Clustering (DBSCAN)The groups have irregular shapes and you want noise identifiedIt reports clusters and noise counts for the rows it was given and returns no reusable model handle
Gaussian MixtureFit Clustering (Gaussian Mixture)You want soft membership and per-component covariancelinfa hard-codes its internal RNG at seed 42, so the Seed pin only re-orders rows; a tiny mixture weight means that component captured almost nothing

Clusters do not acquire business meaning automatically. Review representative records and check stability across seeds and samples before attaching labels to them.

MethodNodePick it whenWatch out for
PCAPCA ReductionCorrelated numeric columns should be compressed while keeping linear varianceLinear only; it writes reduced vectors back into the table and returns explained variance, not a reusable fitted model
t-SNEt-SNE ReductionYou want a two- or three-dimensional picture for explorationTransductive, so it produces no reusable model, and distances and cluster sizes in the layout carry no validated meaning
StepNodePick it whenWatch out for
Feature ScalerFit Feature ScalerAny distance- or gradient-based model is downstream: Logistic Regression, Elastic Net, SVM, KNN, Gaussian Mixture, and every ordinal trainer except Frank & Hall, whose base learners need no scalingIt learns offsets and scales from the data it sees, so fit it on the training split only
TF-IDF VectorizerFit TF-IDF VectorizerA text column has to become numeric vectors for a classifierlinfa recomputes the inverse document frequencies from the corpus being transformed, so vectors are only comparable within a single Apply Transform run
Apply TransformApply TransformA fitted transformer has to be replayed on another tablePass the same fitted model you trained with; a second Fit call produces different statistics

The sequence matters. Split before fitting anything that learns from data, then carry those fitted transforms forward as part of the model contract.

StageNodeWhy it is in this order
SplitSplit Dataset, Stratified SplitSplit before anything looks at the data; stratify when class proportions are uneven
Fit scaling on trainFit Feature ScalerLearns offsets and scales without looking at the test split
Apply the scaler to every splitApply TransformReplays the exact offsets and scales learned on train
TrainAny trainer from the tables aboveOne model, one documented configuration
EvaluateAccuracy, Ordinal Metrics, Regression MetricsOn the untouched split, with a task-appropriate metric
SaveSave ModelSave the predictor and each fitted transformer separately, then version them as one contract
PredictPredictSame feature order, types, and transforms as training

A transform that learns from data is itself a fitted model. That is the whole point of Feature Scaler being a fitted model rather than a formula: you fit it once on the training split and pass that same fitted object to Apply Transform for validation, test, and inference. Fitting a second scaler on the test split gives that split its own statistics and quietly invalidates the comparison.

Supporting dataset nodes: K-Fold Split runs its connected branch once per fold, Shuffle Dataset and Sample Dataset reorder or subset rows. For time-dependent data, split chronologically instead of randomizing future observations into the training set.

Auto Classifier cross-validates several classifier families and retrains the winner; Auto Ordinal does the same for ordered targets and ranks by a distance-aware metric. Feed the reported best model type into Grid Search or Ordinal Grid Search to tune it, including an OrdinalNeural winner — its grid takes hidden_layers, head, activation, alpha, learning_rate and max_iterations, but keep it small, because every combination trains a network from scratch on every fold. Use the ordinal pair for ordered targets — Auto Classifier resolves the target without its order and ranks by accuracy or macro F1, either of which scores a five-level miss exactly like a one-level one. See Auto Training.

TaskNodesNote
ClassificationAccuracy, Confusion MatrixAccuracy alone hides poor minority-class performance; read the matrix
Binary classification with probabilitiesROC-AUC & Log LossNeeds a P(positive class) column, which batch prediction does not produce — see below
RegressionRegression MetricsMSE, RMSE, MAE, and R²; also check residual patterns, not one aggregate
OrdinalOrdinal MetricsQuadratic weighted kappa as headline, plus linear kappa, macro error, and rank correlation
ClusteringSilhouette ScoreDistances are euclidean, so scale features before reading the score

Accuracy is the wrong headline for an ordered target because it gives no partial credit for a near miss: one level off counts exactly like four levels off. Ordinal Metrics weights every miss by how far off it was.

ROC-AUC needs a column of P(positive class), and Predict does not write one. In Database mode it writes the predicted class only; the confidence figure exists solely on the struct returned by its Vector mode, one row at a time. So building that column means looping rows through Vector-mode Predict and writing the value yourself.

Converting it correctly matters as much as producing it: confidence is the winning class’s probability, not the positive class’s. Use it directly where the prediction is the positive class and 1 - confidence elsewhere. A raw confidence column produces a meaningless curve and does not error.

Only models that carry a probability model report a confidence at all. Decision Tree, Random Forest, AdaBoost, both Naive Bayes variants, Frank & Hall, Ordinal Ridge and every regressor return none, so ROC-AUC and log loss are unavailable for them.

To inspect a fitted model: Model Info for general metadata, Get Coefficients for linear regression, Get Centroids for KMeans, and Feature Importance for Decision Tree, Random Forest, and AdaBoost.

NeedNode
Save through the path abstractionSave Model
Load through the path abstractionLoad Model
Save as raw binary (Fory format)Save Model (Binary)
Load raw binary (Fory format)Load Model (Binary)
Run a model on prepared featuresPredict

Each Save Model call accepts one model handle. Persist the predictor and every fitted transformer with separate save nodes or paths, then give the set one shared version in your model card or deployment metadata.

Inference has to reproduce the training feature order, types, missing-value handling, and every fitted transform. Validate the input schema before calling Predict, and store a short model card with the artifact: training data version, feature schema, target definition, metrics, intended use, limitations, and owner.

For KNN models, remember that the artifact contains the training rows themselves. Apply the same access controls to the model file that you apply to the source table.

  • The target column has been classified as unordered, ordered, continuous, or absent
  • Ordinal targets declare an explicit Class Order unless the labels are numeric
  • Leakage fields created after the prediction target are removed
  • Train, validation, and test data are separate, and time-dependent data is split chronologically
  • Preprocessing is fitted on the training split and replayed with Apply Transform
  • Baseline and selected model are compared on the same untouched evaluation set
  • The metric matches the task, and ordered targets are not judged by accuracy
  • Model and fitted transformers are saved separately, then versioned together with the feature schema and data version
  • Inference validates feature order and types
  • Models embedding training rows are stored with source-table access controls