Learn AI Engineering Rent GPUs By The Hour Docker VPS Hosting Automate 3000+ Apps No Code AI Agents Proxies For Your Agents
Learn AI Engineering Rent GPUs By The Hour
Websites To LLM Data Proxies For Scraping AI Support Chatbot AI Data Analyst AI Agent Workspace Hire AI Builders

Machine Learning Model Cheat Sheet: When to Use Each of 18 Models

Updated November 2026
Pick the family by the answer you want back, a label means a classifier, a number means a regressor, groups with no labels means a clusterer, and a normal or weird flag means an anomaly detector. Then start with the simplest model in that family, naiveBayes or randomForest, ridge, kmeans, or isolationForest, and only move to a heavier one when your own test results ask for it. The tables below put all 18 side by side.

The 1 Minute Version

You haveYou wantStart withThen try
Short text with labelsA categorynaiveBayeslogisticRegression, then dnn
Table columns with labelsA categoryrandomForestadaBoost, or tree to explain
Under 100 labeled rowsA categoryknnnaiveBayes
Table columns with a numberA numberridgegradientBoost
Comparable past casesA numberknnRegressorgradientBoost
No labels, known group countGroupskmeansgaussianMixture
No labels, unknown group countGroups plus noisedbscankmeans once you know the count
Many columns of normal behaviorA weird flagisolationForestlocalOutlierFactor
1 metric over timeA weird flagrobustZScoreisolationForest

The class names in code style are the ones used by ML Prediction Engine, the free open source tool the step by step guides in this topic are built on. "Rows to start" in the tables below means the point where the model becomes useful, not where it stops improving.

Classifiers: You Want a Label

ModelBest forProsConsRows to start
K Nearest Neighbors
knn
Small data, answers that must be explained by similar casesNothing to train, easy to explain, follows odd shaped groupsSlows as rows grow, hurt by junk columns since every column counts equally20 to 30 per label
Naive Bayes
naiveBayes
Short text: spam, intent, topicNo parameters, instant training, handles many labelsIgnores word order, weak when features depend on each other20 to 30 per label
Logistic Regression
logisticRegression
Text past a few hundred rows, yes or no on numeric columnsStable, fast, strong baselineCan not learn combinations or curves50 per label
Decision Tree
tree
Rule like decisions that need a readable reasonReads like a flowchart, no scaling, handles combinationsMemorizes when deep, jumpy, poor on text30 per label
Random Forest
randomForest
Table data with mixed columns, the default choiceAccurate on defaults, ignores junk columns, tolerates some bad labelsNot readable, larger model, weak on rare labelsA few hundred
AdaBoost
adaBoost
Yes or no on clean table dataStrong from simple pieces, resists memorizingThrown off by wrong labels and outliersA few hundred
Deep Neural Network
dnn
Large text sets, patterns the others missLearns combinations and curves, keeps improving with dataNeeds many rows, slow to train, 4 parameters, no explanation1,000 or more

Regressors: You Want a Number

ModelBest forProsConsRows to start
Ridge Regression
ridge
Proportional relationships, the baseline for everythingInstant, readable weights, follows a trend past the dataStraight lines only, pulled by outliers in the label50, or 10 per column
KNN Regressor
knnRegressor
Estimating from comparable past casesFollows any shape, realistic answers, easy to explainNever predicts beyond what it has seen, slows as rows grow100 across the range
Support Vector Regression
svr
Smooth curves on small, noisy dataIgnores small errors, steady, smooth outputLabel must be scaled, slow past about 10,000 rows100
Gradient Boost
gradientBoost
Table data, usually the most accurateLearns curves and combinations, no scaling, ignores junk columnsFlat beyond the training range, can fit noise with too many roundsA few hundred
MLP Regressor
mlpRegressor
Complex shapes with a lot of dataAny curve, smooth outputNeeds many rows and a scaled label, slow, differs between runs1,000 or more

Clusterers: You Have No Labels and Want Groups

ModelBest forProsConsRows to start
K-Means
kmeans
A set number of groups, text themes, segmentsFast, simple, works on textAlways returns k groups, round groups only, every column counts equallyA few dozen per group
DBSCAN
dbscan
Unknown number of groups, duplicates, outsidersFinds the count itself, any shape, answers -1 for noise1 radius for all groups, clusters on every prediction so keep the data small50
Gaussian Mixture
gaussianMixture
Overlapping groups of different sizes on numeric columnsEach group has its own size and shapeNeeds more rows, not for text or many columns50 per group

Anomaly Detectors: You Want a Normal or Weird Flag

ModelBest forProsConsRows to start
Isolation Forest
isolationForest
Many columns at once, the general pickNo scaling, fast on large data, needs no bad examplesMisses context anomalies, always flags a set share, no reason givenA few hundred normal rows
Local Outlier Factor
localOutlierFactor
Values wrong for their context, several kinds of normalJudges each row against its own kindSlows on large data, weak with many columns, always flags a set share40 to 60 per kind of case
Robust Z Score
robustZScore
Watching 1 metric with alerts people can readExplainable in a sentence, tolerates dirty history, can flag nothingChecks columns separately, fails on metrics that rarely change, numbers only50 readings

Default Parameters

Every model works with an empty parameter object, these are the defaults it falls back to and the one setting most worth changing first.

ClassDefaultsChange this first
knn{"k": 5}k, try 3, 9, and 15
naiveBayes{}Nothing to change
logisticRegression{"c": 1, "maxIter": 200}c, try 0.1 and 10
tree{"maxHeight": 10}maxHeight, go lower, 3 to 5
randomForest{"estimators": 100, "treeMaxHeight": 0}Usually nothing, 0 means no depth limit
adaBoost{"estimators": 100, "rate": 1}rate 0.5 with estimators 200
dnn{"layers": [128, 64], "epochs": 300, "learningRate": 0.001, "alpha": 0.0001}layers, smaller for less data
ridge{"alpha": 1}alpha, try 0.1 and 10
knnRegressor{"k": 5}k, try 3 and 10
svr{"c": 1, "epsilon": 0.1}c, raise to 10 or 100 if predictions are flat
gradientBoost{"estimators": 100, "rate": 0.1, "treeMaxHeight": 3}rate 0.05 with estimators 200
mlpRegressor{"layers": [128, 64], "epochs": 300, "learningRate": 0.001, "alpha": 0.0001}layers, then alpha
kmeans{"k": 4}k, by reading the groups
dbscan{"radius": 0.5, "minDensity": 5}, plus "scale": false for raw unitsradius, by how much comes back as noise
gaussianMixture{"k": 4}k, by describing each group
isolationForest{"estimators": 100, "contamination": 0.1}contamination, down to your real alert rate
localOutlierFactor{"k": 20, "contamination": 0.1}contamination, then k
robustZScore{"threshold": 3.5}threshold, 5 for fewer alerts

Who Scales the Numbers

Some models compare raw sizes and some do not, and getting this wrong is the most common reason a model that should work does not. Text is never a concern, it is always converted to word scores on 1 scale. For numeric input:

SituationClassesWhat to do
Scale does not mattertree, randomForest, adaBoost, gradientBoost, isolationForest, robustZScore, naiveBayesSend raw values
Scaled for you by the enginelogisticRegression, dnn, ridge, knnRegressor, svr, mlpRegressor, localOutlierFactor, knn, kmeans, dbscanSend raw values
Raw units on requestdbscanAdd "scale": false when the radius is a real distance, like points on a map
Helps, but matters lessgaussianMixtureBring columns into roughly comparable ranges when one is far larger than another
Scale the label toosvr, mlpRegressorDivide the label into a small range and multiply the prediction back

Rules That Apply to All 18

  • Judge a model only on rows it did not train on. Every model looks good on rows it has already seen.
  • Rows beat model choice. Going from 50 rows to 500 real, balanced rows usually helps more than any switch between models.
  • Keep labels balanced. A label with 10 times the rows of another wins most close calls.
  • Add your mistakes back. A real input the model got wrong, with the right label, is the most valuable row you can add.
  • Get a baseline first. Train the simple model in the family before the heavy one, so you know what the heavy one has to beat.
  • If 3 different models all miss the same rows, the answer is not in your columns, and no fourth model will find it.
Key Takeaway

The answer shape picks the family and the size of your data picks the model. Small data wants knn, naiveBayes, ridge, or robustZScore. A few hundred rows open up randomForest and gradientBoost, which are the strongest general choices. The neural models, dnn and mlpRegressor, are for 1,000 rows or more and only after a simpler model has set the bar.