When to use it
Predict a category or a number from a mix of numeric and categorical predictors when the relationship may be non-linear or involve interactions, and you want strong out-of-the-box accuracy with a built-in honesty check (the out-of-bag score). Use it when prediction matters more than an interpretable equation: for interpretable effects, fit a regression on the same columns.
When not to: Interpretability of individual effects is required for stakeholders or regulators (a regression or a single tree is more appropriate), predictions are needed outside the range of the training data for a regression outcome (forests cannot extrapolate; predictions flatten at the edges), or a genuinely numeric column has been mistyped as text, which silently degrades the model unless the card's specific flag for this is checked.
Step by step
Open it from the menu
Click Multivariate & ML in the menu bar; under Machine Learning choose Random Forest.
Fill in the form
Choose the columns: What you want to predict, Columns that may explain it. The form lists only columns whose type fits each field.
Check the options
The options start at their defaults: Trees (n_estimators), Max tree depth, Features per split, Min samples per leaf, CV folds, Random seed. Change one only when your question needs it.
Run the analysis
Press Run analysis. The Result Card opens on its Results tab.
What to choose in the form
| What you want to predict Outcome required | One categorical or binary or numeric column. Outcome to predict. Categorical or two-level → classification; continuous numeric → regression. |
|---|---|
| Columns that may explain it Predictors required | One numeric or categorical or binary column. One or more predictors. Numeric columns are used as-is; categorical columns are dummy-encoded (col=level). |
| Trees (n_estimators) | Number of trees in the forest. More trees never overfit: they stabilize the estimate at the cost of compute. Default: 200. |
| Max tree depth | Maximum depth of each tree; 0 = grow fully (the standard forest default). Default: 0. |
| Features per split | Predictors considered at each split. auto = sqrt(p) for classification, all features for regression (the usual defaults). Default: auto. |
| Min samples per leaf | Minimum rows in a leaf. Raising it smooths each tree (less variance, more bias). Default: 1. |
| CV folds | Cross-validation folds (stratified for classification), seeded for reproducibility. Default: 5. |
| Random seed | Seeds the bootstrap draws, the CV shuffle, and permutation importance so results are reproducible. Default: 42. |
How to read the card
The Results tab starts with what to know first (rows left out, checks that did not pass), then the interpretation in words and the Key Results; charts and assumption checks follow further down. Learn More explains the method in plain words. Read a Result Card covers all four tabs.
A worked example
Classifying penguin species from four body measurements with 500 trees, comparing OOB score against 5-fold cross-validated accuracy.
Result: OOB score = 97.7%, 5-fold cross-validated accuracy = 97.7% (in-sample 100%); out-of-sample permutation importance ranks bill length highest (0.33) with flipper length second, and the impurity-based ranking also puts bill length first and flipper length second.
The close agreement between OOB and cross-validated accuracy supports trusting both as honest estimates of real-world performance, and the agreement between the two importance measures here (rather than a disagreement) suggests bill length's leading role is a genuine signal rather than an artifact of high cardinality: bill length is what separates Chinstrap from Adelie, which body-size measures cannot.
From the Statistics Library.
The code tabs
Code gives this analysis as Python, R and MATLAB code (and SAS where the tab offers it), reading the data the way KernelStats did. Export sends the card to a report or to slides. See The Code tab.
Understand the statistics
Ask Oobi
Type one of these into Ask Oobi beside your data:
- Which measurements best identify a penguin's species, and how accurate is the prediction on penguins the model never saw?
- Explain the random forest in plain words.
- What does overfitting mean?
Last reviewed November 16, 2026.
