SPSS command: SPSS MLP
Multilayer perceptron neural network in your browser
A multilayer perceptron is a feed-forward neural network that learns nonlinear relations and interactions between predictors and a categorical or scale target.
Free · No account · Files stay on your device · Updated 18 October 2026
What it tells you
Crosstabs trains it on your device following the SPSS MLP algorithm — training, testing and holdout partitions, one or two hidden layers, scaled conjugate gradient or gradient descent, the SPSS stopping rules — and reports classification tables, ROC, gains, lift and sensitivity-based predictor importance.
- How accurately the network classifies (percent incorrect) or predicts (relative error) cases it was not trained on, in the testing and holdout samples.
- Where it confuses categories, from the classification table for each partition, and how well it ranks cases, from the ROC curve, area under the curve, cumulative gains and lift.
- Which predictors the network relies on most, from the independent variable importance table and normalized importance chart.
- How many hidden units suit the data, when automatic architecture selection is used.
When to use it
Use it when
- Predicting churn, purchase or a segment where effects are nonlinear or interact and a logistic model underfits.
- You have enough cases to set aside testing and holdout samples — typically several hundred or more.
- Accuracy matters more than an equation you can explain coefficient by coefficient.
Use something else when
- You need interpretable effects or significance tests: use logistic, multinomial or linear regression.
- Small samples: a network with dozens of weights can easily overfit a few hundred cases; try logistic regression or a decision tree first.
- You must reproduce weights from SPSS exactly: SPSS's random starting values are undocumented, so the weights differ even when the settings match.
- Survey weights must be applied: the neural-network algorithms define no case weights, so results are unweighted.
How to run it in Crosstabs
- 01
Open your data
Open the file in the workspace and switch to Statistics mode.
- 02
Choose Multilayer perceptron
In the Machine learning group, pick Multilayer perceptron.
- 03
Set target, predictors and rescaling
Under Variables choose the Target measurement (Categorical (classification) or Scale (prediction)), the Target, any Factors and Covariates, and the Rescaling of covariates (Standardized by default) and, for a scale target, the Rescaling of scale target.
- 04
Set the partitions
Under Partitions set Training (relative), Testing (relative) and Holdout (relative) — 7 : 3 : 0 by default — and a Random seed so the split and the starting weights can be reproduced.
- 05
Choose the architecture
Keep Architecture selection on Automatic (one hidden layer, best number of units) with Minimum and Maximum hidden units, or choose Custom and set Hidden layers (1 or 2), the units per layer, the Hidden layer activation and the Output layer activation.
- 06
Choose the training and run
Under Training pick the Type of training (Batch, Online or Mini-batch); for batch, the Optimization algorithm (Scaled conjugate gradient or Gradient descent). Set Maximum steps without a decrease in error and Maximum training steps, then click Run; progress is shown and the run can be cancelled.
Worked example
Computed by the Crosstabs engine from the synthetic data below when this page was built — not typed in.
Data
300 synthetic subscribers with contract type (monthly, annual, two-year) as a factor and tenure (months) and monthly spend as covariates. Churn was generated from an interaction — high spend raises churn risk only for short-tenure customers — plus a protective effect of longer contracts. A seeded partition puts cases into training, testing and holdout at relative sizes 6 : 2 : 2. Custom architecture: one hidden layer with 4 hyperbolic-tangent units, softmax output, batch scaled conjugate gradient.
| Statistic | Value |
|---|---|
| Training — Cross Entropy Error | 55.474 |
| Training — Percent Incorrect Predictions | 13.4% |
| Training — Stopping Rule Used | 1 consecutive step(s) with no decrease in error |
| Training — Steps | 3 |
| Testing — Cross Entropy Error | 20.657 |
| Testing — Percent Incorrect Predictions | 15.5% |
| Holdout — Percent Incorrect Predictions | 23.8% |
Error computations are based on the testing sample; the reported weights are those at the step with the lowest error.
| Observed | Churned | Stayed | Percent Correct |
|---|---|---|---|
| Churned | 18 | 5 | 78.3% |
| Stayed | 10 | 30 | 75.0% |
| Overall Percent | 44.4% | 55.6% | 76.2% |
| Predictor | Importance | Normalized Importance |
|---|---|---|
| contract | 0.236 | 53.8% |
| tenure | 0.326 | 74.4% |
| spend | 0.438 | 100.0% |
Sensitivity analysis on the combined training and testing samples.
How to read it
The 5–4–2 network (input units, hidden units, output units) trained for 3 steps and stopped by the rule “1 consecutive step(s) with no decrease in error”, which checks the testing sample. On the 63 holdout customers it misclassifies 23.8% (76.2% correct), better than the 63.5% obtained by predicting the larger class for everyone. spend has the highest normalized importance (100.0%). Training stopped after only 3 steps because the testing error stopped falling; raising Maximum steps without a decrease in error lets the optimizer look further before it gives up. Rerunning with another random seed changes the partition and the starting weights, so expect the error to move by a few points.
Output tables explained
- Case Processing Summary
- Cases in training, testing and holdout, and cases excluded for missing values or for a factor or target category never seen in training.
- Network Information
- Input units, rescaling, the number of hidden layers and units, activation functions and the error function (cross-entropy with a softmax output, otherwise sum of squares).
- Model Summary
- Error and percent incorrect predictions (or relative error for a scale target) per partition, the stopping rule used and the number of training steps. Judge the model on testing or holdout, not training.
- Classification
- Observed by predicted counts with percent correct, one table per partition (categorical target).
- Area Under the Curve
- AUC per target category, alongside the ROC, cumulative gains, lift and predicted-by-observed charts computed on the combined training and testing samples.
- Independent Variable Importance
- Sensitivity-based importance of each predictor and its normalized importance relative to the most important one; parameter estimates for every layer follow, and predictions can be downloaded as CSV.
Assumptions and notes
- Testing and holdout cases are a random sample like the training cases; the holdout sample plays no role in training, so its error is the honest estimate.
- Cases with a missing target or predictor are excluded; factors are one-of-c coded and covariates rescaled using the training cases.
- Initial weights come from simulated annealing on a random sample of at most 1000 cases, so a different seed gives a somewhat different network.
- With a testing sample, the stopping rules check the testing error and the reported weights are those at the step with the lowest error.
How the results are validated
The MLP engine is checked against an independent, vectorised NumPy implementation written from the SPSS algorithm chapter that shares only the documented mulberry32 random-number protocol. Backpropagated gradients match the NumPy matrix gradients to 1e-10 and central finite differences to 1e-6 for four network shapes; five steps of scaled conjugate gradient and batch, online and mini-batch gradient descent match to 1e-10. Seven full runs (custom one- and two-layer networks, all training types, automatic architecture selection) reach the same step count and stopping rule, with final weights within 1e-6 for short runs and 1e-3 for longer ones, errors within 1e-8 (1e-6), importance within 1e-7 (1e-4), and AUC equal to scikit-learn roc_auc_score to 1e-12. Weights are not compared with SPSS, whose random stream is undocumented. Validation evidence
Questions
Why do my weights differ from SPSS?
Training starts from random weights refined by simulated annealing, and SPSS does not document its random-number stream or internal sample. The algorithm follows the SPSS chapter, but the starting point differs, so expect similar accuracy rather than identical weights.
What are the testing and holdout samples for?
The testing sample decides when training stops, to prevent overfitting, and is used in automatic architecture selection. The holdout sample is never used during training, so its error is the fair estimate for new data.
Training stopped after a few steps — is that a problem?
With the default of one step without a decrease in error, training stops as soon as the testing error rises. Raise Maximum steps without a decrease in error to let it continue, and compare the holdout error to see whether it helps.
One or two hidden layers?
One hidden layer can approximate most smooth relations and is what automatic selection uses. Choose Custom with two layers only when you have many cases and one layer clearly underfits.
How is predictor importance computed?
By sensitivity analysis on the training and testing cases: each predictor is moved over its minimum, quartiles and maximum (or its categories) and the average largest change in the network output is recorded, then scaled to sum to 1.
Is my data uploaded?
No. Training runs in a Web Worker in your browser; the data never leaves your device.
Related procedures
- Radial Basis Function NetworkRBF
- Binary Logistic RegressionLOGISTIC REGRESSION
- Nearest Neighbor Analysis (KNN)KNN
- Multinomial Logistic RegressionNOMREG
- ROC CurveROC
- Predictor SelectionSELECTPRED
- Free SPSS alternative: full coverage list
Run Multilayer Perceptron on your own data
Open a .sav, CSV or Excel file. Everything runs in your browser; the file never leaves your device.
SPSS is a trademark of IBM Corp. Crosstabs is not affiliated with or endorsed by IBM.