When to use it
Predict a category or a number when the relationship between predictors and outcome may be smoothly non-linear and interactive, and simpler models (regression, trees) have hit their ceiling on cross-validated performance. Neural networks need more data than most methods: on small tabular datasets a regression or a tree ensemble usually matches or beats them, and both are far easier to interpret.
When not to: The dataset has only a small number of rows relative to the number of parameters (the parameter count will dwarf the data, and cross-validation will expose this), interpretability or individual-effect explanation is required for stakeholders or regulators, or a simpler model (linear/logistic regression, a tree ensemble) already achieves comparable cross-validated performance; the added complexity has earned nothing in that case.
Step by step
Open it from the menu
Click Multivariate & ML in the menu bar; under Machine Learning choose Neural Network (MLP).
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: Hidden layers, Units per hidden layer, Activation, L2 penalty (alpha), Learning rate (Adam), Max iterations, Standardize predictors, 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). |
| Hidden layers | Number of hidden layers (1 or 2). One layer is enough for most tabular problems. Default: 1. |
| Units per hidden layer | Neurons in each hidden layer (1-512). More units = more flexibility = more variance to control. Default: 64. |
| Activation | Nonlinearity applied by each hidden unit. ReLU is the modern default; tanh/logistic are smooth classical choices. Default: relu. |
| L2 penalty (alpha) | Ridge-style weight penalty. Larger values shrink weights harder and reduce overfitting. Default: 0.0001. |
| Learning rate (Adam) | Initial step size for the Adam optimizer. Too high diverges; too low trains slowly. Default: 0.001. |
| Max iterations | Maximum training epochs. Training stops earlier automatically once the loss plateaus. Default: 1000. |
| Standardize predictors | Scale predictors to mean 0, SD 1 inside the CV pipeline. Strongly recommended: gradient descent struggles on raw scales. Default: on. |
| CV folds | Cross-validation folds (stratified for classification), seeded for reproducibility. Default: 5. |
| Random seed | Seeds the weight initialization, Adam's shuffling, and the CV split 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 the default network (one hidden layer of 64 relu units, seed 42), compared against linear discriminant analysis on the same predictors. (A multinomial logistic regression on these four predictors does not converge (the species are nearly separable), which is why LDA is the linear baseline here.)
Result: The 4-64-3 network has 515 trainable parameters for 342 rows (the card flags this); it reaches in-sample accuracy of 99.1% and 5-fold cross-validated accuracy of 98.8%. LDA reaches 98.5% cross-validated accuracy with a handful of interpretable discriminant coefficients.
The two models perform almost identically once judged honestly by cross-validation, despite the MLP having more parameters than rows, exactly the case where the simpler, interpretable linear model should be preferred, since the network's extra 500-odd parameters bought a third of a percentage point, well within fold-to-fold noise.
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:
- Can a small neural network identify a penguin's species from its measurements, and does it actually beat a simpler model once both are scored honestly by cross-validation?
- Explain the neural network (multilayer perceptron) in plain words.
- What does overfitting mean?
Last reviewed November 16, 2026.
