Neural Network Lab

Machine Learning Prediction

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 & LEARNING OBJECTIVES

A vendor says their AI predicts which subscribers will cancel better than your analyst's regression. Ridgeline's save offer costs $14 a bag, so a better list is worth real money, but only if the gain shows up on customers neither model has seen. This lab trains a small neural network on a customer file, scores it against a regression on held-back customers, and shows you what it learned.

🎯 What You'll Learn
  • A network is a flexible regression, not magic. It can bend where a regression is straight. When there is nothing to bend, it does no better.
  • Compare on held-back customers, against the simplest model that could work. How well a model does on the rows it learned from says nothing. If it cannot beat a regression on new rows, it should not ship.
  • When the network wins, ask why. A win points at a curve or an interaction. Give the regression that shape and it usually wins back, and you can still explain it.
  • Watch the validation curve, not the training curve. Training loss always falls. Stop where validation loss is lowest; on small data, more epochs and more units make things worse.
  • Importance is not effect, and not cause. It says how much the predictions lean on an input, not which way the input pushes or what would happen if you changed it.
  • Never trust a network outside the data it saw. Past the training range its curve flattens or shoots off because of how it was built, not because of the market.
πŸ•ΈοΈ What a neural network is, in one paragraph

A neural network turns each customer's columns into a prediction in stages. The first stage makes a handful of weighted mixes of the inputs (the "hidden units"), bends each one with a fixed curve (the "activation"), and the last stage mixes those into a probability or a number. Training nudges every weight, over and over, to make the predictions on the training customers a little less wrong; one full pass over them is an "epoch". With enough units it can draw almost any shape, which is exactly why it can also memorize noise. To see a network bend a boundary with two inputs, try the Neural Network Playground; this lab is where you judge one on a real customer file.

πŸ“˜ Key concepts
  • Three parts of the data: the network learns from the training rows, the validation rows decide when to stop, and the holdout rows are scored once, at the end, for every number you report.
  • Baseline: the regression the network has to beat: logistic for a yes/no outcome, multinomial logistic for a category, multiple regression for a number.
  • Early stopping: keep the network from the epoch where validation loss was lowest, not the last one.
  • Paired bootstrap interval: how much the gap between the two models would move with a different set of held-back customers. If it includes zero, there is no real difference.
🧭 When to use it, and when not to

Use it on a table with one row per customer (or account, or market) and a dozen or so columns, when you want to know whether a flexible model finds something a regression misses.

  • You need to explain the effect of each driver: use Logistic Regression or Multiple Linear Regression.
  • Fewer than about 300 rows: a network will mostly memorize. Start with a regression.
  • Rows over time for one series: use the time-series tools.

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.

πŸ“€

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.

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:

    1. Load Ridgeline Roasters and train. Note the network's log loss and the logistic regression's, and read the verdict.
    2. Add two terms to the baseline: emails_per_month squared, and save_offer Γ— lifecycle_stage. The network does not need to train again.
    3. 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.