Train a small neural network on your customer data, watch it learn, and find out honestly whether it beats a
regression you could explain.
👨🏫 Professor Mode: Guided Learning Experience
New to neural networks? Professor Mode walks you through training one, judging it against a
regression on customers it never saw, and spotting when it memorizes.
QUICK START: Choose Your Path
OVERVIEW & WHAT THIS TOOL SOLVES
When an AI vendor claims their deep learning model predicts customer churn or spend better than your analyst's regression, you need to know whether that gain is real signal—such as a curved diminishing-returns pattern or an interaction—or just memorization of training noise. The Neural Network Lab trains a feed-forward multilayer perceptron (MLP) side-by-side with a linear/logistic regression baseline on the exact same train/holdout split, auditing out-of-sample lift with paired bootstrap confidence intervals.
New to what a network actually is? Start with the Neural Network Playground, then come back here to put one to work on a real customer file.
🎯 Questions It Answers
Does a neural network genuinely outperform a standard linear or logistic regression on unseen holdout customers?
How many hidden units, epochs, and L2 weight-decay regularization keep the network from overfitting small customer files?
Which features and non-linear response curves did the network learn compared to the flat slopes of a regression?
📂 What Data You Need
Customer Dataset: Preset marketing case study or uploaded CSV with numeric/categorical predictors and a continuous or binary target
Network Architecture: Hidden layer size (2 to 16 ReLU units), learning rate, L2 penalty (λ), and training epochs
Holdout Protocol: Seeded train/holdout split so both models are judged on the exact same untouched customers
💡 What You'll Discover
Head-to-Head Holdout Verdict: Paired bootstrap 95% CI on the holdout performance gap (RMSE or Log-Loss/AUC)
Epoch Learning Curves: Training vs. validation loss across epochs with automatic best-validation checkpointing
Glass-Box Inspection: Permutation feature importance, partial-dependence response curves, and live network diagram
🔍 Key Nuances & Common Traps to Watch For
Training Fit Means Nothing for Neural Nets: A wide network with enough epochs will almost always beat regression on the training rows by memorizing quirks. Only a positive holdout delta whose 95% bootstrap CI excludes zero justifies deploying the network.
When Linear/Logistic Regression Wins: When the true customer relationship is mostly additive and monotonic—or when sample size is small (n < 300)—regression matches or beats a neural network while remaining immediately interpretable.
Why L2 Weight Decay and Early Stopping Matter: Penalizing large weights (λ > 0) and restoring the epoch with the lowest validation loss prevent the ReLU hinges from chasing outlier customers.
📐 Under the Hood: Model Equations & Variable Definitions
💬 Read it in plain English: Each hidden unit j computes a weighted sum of standardized inputs x and passes it through a ReLU hinge max(0, z) to bend the response surface, then the output layer combines all H hinges via link function g(·) (identity for continuous spend, logistic sigmoid for binary churn).
x (x1…xP)
Standardized Predictor VectorYOUR DATA ⓘ
Customer input features z-scored using training-set mean and SD.
H, hj
Hidden Units & ReLU ActivationsESTIMATED ⓘ
Number of hidden neurons H and the non-negative activation output of hidden unit j.
wj, bj
Hidden-Layer Weights & BiasESTIMATED ⓘ
Learned input-to-hidden slopes w_{jp} and threshold intercept b_j for unit j.
vj, v0
Output-Layer Weights & BiasESTIMATED ⓘ
Learned weights combining the H hidden activations into the final score.
ŷ
Model PredictionOUTPUT ⓘ
Predicted continuous outcome (when g is identity) or predicted probability P(y=1) (when g is sigmoid).
2. L2-Penalized Training Objective & Paired Holdout Difference
💬 Read it in plain English: Training minimizes average prediction error plus an L2 weight-decay penalty λ that shrinks extreme weights, and the model is judged by Δ_holdout—how much error the neural net cuts on unseen holdout rows compared to regression.
ℓ(yi, ŷi)
Observation Loss FunctionESTIMATED ⓘ
Squared error (y − ŷ)² for regression tasks or binary cross-entropy (log-loss) for classification.
λ
L2 Weight-Decay PenaltyYOUR DATA ⓘ
Regularization strength penalizing squared network weights to curb overfitting.
Δholdout
Paired Holdout Performance GainINFERENCE ⓘ
Out-of-sample error reduction vs. baseline regression, evaluated with a paired bootstrap 95% CI.
Step 1DATA SOURCE
Start with a case: each one was generated from a known formula, so at the end you can check what the network
found against the truth. Or bring a customer file of your own.
📚
Use a Case Study
Five cases: a coffee subscription deciding who gets a save offer, a catalog mailer told to "use AI",
a software trial with a network far too big for its data, a streaming service choosing which plan to
lead with, and a mattress brand asking what more social spend would buy.
📚Use a Case Studyclick to switch
📤
Upload Your Data
Drag & Drop raw data file (.csv, .tsv, .txt)
One row per customer: an outcome column (yes/no, a category with 3 to 8
levels, or a number) and the columns to predict it from. Numbers can be on any scale; text columns
become 0/1 columns automatically. Leave out IDs, dates, free text, and anything recorded after the
outcome. At least 150 rows.
No file uploaded.
📤Upload Your Dataclick to switch
INPUTS & SETTINGS
Step 2Tell the model what to predict, and from what
Pick the outcome, then tick the columns to predict it from. Both models (the network and the regression)
use exactly the same columns and the same customers, so the comparison is fair.
Predictors
No data loaded.
Step 3Set up the network, the split and the baseline
The defaults are a sensible small network. Change one thing at a time and train again, so you can see what
that one change did.
How the customers are divided
The network learns from the training rows. The validation rows only decide when to stop. The
holdout rows are kept back until training is over, and every number in the results comes from them.
The network
Training
The baseline to beat
The regression gives every chosen column one straight-line effect of its own.
Up to four. A squared term lets the regression curve; a product lets one input's effect
depend on another's.
Advanced
🤔 Try this:
Load Ridgeline Roasters and train. Note the network's log loss and the logistic regression's, and
read the verdict.
Add two terms to the baseline: emails_per_month squared, and
save_offer × lifecycle_stage. The network does not need to train again.
Now who wins? Look at what the network's emails curve looked like, and ask why those two terms were
the right ones to add.
Step 4TRAINING
Press Train and watch both curves. The network only ever learns from the training customers; the validation
line shows how it is doing on customers it is not learning from. That second line is the one that matters.
Load a case or upload a
file to begin.
Parameters per training row:–
Estimated training time:–
Loss on the training and validation customers, epoch by epoch
Down is good: each line is the average penalty for the network's predictions, where a confident miss costs
a lot. The solid line is the customers it learns from, the dashed line the validation customers it does
not. The marker shows the epoch where the dashed line was lowest.
📊 How to Read This Chart
The training line almost always keeps falling: the network is getting better at the customers it is
memorizing.
When the dashed line turns up while the solid one keeps falling, the network has started learning the
training customers' noise. Everything after that point makes it worse on new customers.
The gap between the two lines at the best epoch is normal. A gap that keeps widening is the warning.
Step 5IS IT WORTH IT?
Training is over, so the holdout customers are finally used, once, for every number below. Neither model
has seen any of them.
The network against the regression, on customers neither saw
Shorter bars are better. Each bar is the average penalty on the held-back customers. The no-model guess is
the floor: a model that cannot beat it has learned nothing.
📊 How to Read This Chart
The interval under the chart is the one to read. It says how much the gap would move with a
different set of held-back customers.
If the interval includes zero, the two models are not really different here: keep the one you can
explain.
A gap that is real but tiny may still not be worth what the network costs you in explanation.
Step 6INSIDE THE MODEL
The fitted diagram shows how the network calculates. Its weights are not regression coefficients, so we also ask it questions. Which inputs does it lean on? And
when one input changes, which way do its predictions move?
Your fitted network
A node is a calculation, not a named customer trait. Select a node to inspect its inputs, weights and bias. The network is fully connected between adjacent layers; this drawing shows connections touching the selected node. Blue solid lines are positive weights, orange dashed lines are negative, and gray lines have zero weight. Thickness shows weight magnitude, not predictor importance or causation.
Follow a hypothetical profile
These inputs start at training means and reference categories, not at an individual customer's record. Edit them to see the same fitted network calculate a prediction. Numeric inputs are transformed using training means and standard deviations; category indicators use the fitted reference group.
Text and table view of every layer
The walkthrough explains how a fitted prediction is calculated. It does not replay training or establish the effect of changing a customer's behavior.
Which inputs the predictions lean on
Longer bars mean the predictions depend more on that input: scramble its values across the held-back
customers and the error rises by this much. A bar near zero means the model barely uses it. The thin lines
show how much the answer moved between shuffles.
📊 How to Read This Chart
Importance says how much an input matters to the predictions. It does not say whether more of it
raises or lowers the outcome; the next chart does.
It does not say the input causes anything. An input can stand in for something the data does not
have.
With few held-back customers the bars move a lot from one seed to the next.
What happens to the prediction as one input changes
Each line sets the chosen input to every value along the bottom for every held-back customer, keeps their
other columns as they are, and averages the predictions. A flat line means the model ignores the input;
a bend means it found a curve.
📊 How to Read This Chart
The line is an average over customers. Two groups moving in opposite directions can average out to
flat.
The shaded stretch is past the largest value in the training data. Neither model has any evidence
there; whatever its line does comes from how the model was built.
Compare the shapes: a straight regression line next to a bent network line is the structure the
network found.
Step 7WHAT THIS MEANS
Start with the plain reading, then the two write-ups. The numbers below are the ones to quote.
Did the network beat the regression on new customers?
–
Baseline minus network
Train the network to see what this means here.
Where should training have stopped?
–
Best epoch
What does it lean on most?
–
Top input by importance
Start here
Managerial Interpretation
Train the network to see the managerial interpretation.
APA-Style Report
Train the network to see the APA-style report.
REVEAL THE TRUTH
This case was generated from a known formula. Decide what you think the network found first, then compare
it with the planted drivers and shapes.
Step 8SCORE A NEW FILE
Upload customers you want predictions for. Each row is prepared exactly the way the training rows were (same categories, same scaling). A
row with a number beyond anything the network trained on is still scored, but flagged: there, the network
is guessing.
DIAGNOSTICS & ASSUMPTIONS
Each check says what it found and what to do about it. A failed check is a next step, not a verdict on the
data.
How the network's held-back predictions line up with what happened
For a yes/no outcome: predictions grouped by how confident they were, against how often the outcome
happened. For a category: which category was predicted against which happened. For a number: each
customer's miss against the prediction.
📊 How to Read This Chart
Yes/no: points on the diagonal mean a 30% prediction happens about 30% of the time.
Category: the diagonal holds the customers predicted correctly; read across a row to see where
the rest went.
Number: misses scattered evenly around zero are good; a fan or a curve means the model is wrong
in a pattern.
EXPLORATORY QUESTIONS
On Ridgeline, the network wins and emails is its top input. Does that mean sending more emails causes
cancellations? What does the emails curve say instead?
On Ridgeline, add the two terms from the Try this box. Why is it good news when the regression wins
back?
On Copperline, change the seed a few times and train again. Would you switch the mailing list to the
network? What would it cost you to explain it?
On Tallyhop, where should training have stopped? Turn early stopping on, then try weight decay alone.
Which one rescues the network, and why?
On Kinoscope, accuracy barely moves between the two models. Which score shows the network's gain, and
what is it measuring that accuracy is not?
On Wrenfield, show the curve beyond the data, then switch tanh to ReLU and train again. Which model
would you trust at $60k, and what would you do instead of trusting either?
LEARNING RESOURCES
📚 Going further
Bigger models: gradient-boosted trees usually beat both a small network and a
regression on tables like these. The honest comparison is the same one: held-back rows, against the
simplest model.
Uncertainty: ensembles or conformal prediction give a network prediction
intervals. This lab does not.
Single customers: SHAP values extend permutation importance to one customer at a
time, with the same caveat: importance is not cause.