Neural Network Regression
See how a computer learns to predict numbers. Start by guessing house prices, add more clues and watch the mistakes shrink. Then try curved, non-linear patterns from real life (fuel use by speed, temperature through the year, plant growth) and compare the neural network with a classic straight line. Every setting has a short explanation, and everything runs in your browser.
Learn step by step · 1 of 10
Guess the price of a house
Each blue dot is a house that was sold. The further right, the bigger the house. The higher up, the more it cost.
We'll teach the computer to guess a house's price from its size. Guessing a number like this is called regression.
Try this
Press Start. The green line is the computer's guess for every size. Watch it move to fit the dots.
Neural Network
RegressionPredict a number from examples
- Epochs
- 0
- Training mistake
- –
- Test mistake
- –
- Average mistake
- –
- Within 10%
- –
Data
200 made-up houses that follow real-life patterns.
Clues (features)
What the computer knows about each house. Size is always on because it's along the bottom of the chart.
The model
Layers with neurons
No hidden layers: the model can only learn a straight line. Press + to add one.
Tanh: makes smooth, gentle bends.
Training
How big each learning step is. Too small: slow. Too big: it overshoots.
How many examples it looks at before each correction.
The basic step: move each weight a little against its error.
Mistakes over time
Press Start to see how the mistakes shrink
What the computer learned
Press Start to see how much each clue adds to the price.
Your experiments
Train, then change the clues. Each run's average mistake is saved here so you can compare. Shorter bar = better.
How to use the Neural Network Regression
- 1
Follow the lesson
Ten short steps explain predictions, clues (features), curves, neurons, step size, optimisers and overfitting.
- 2
Pick an example
House prices, car speed vs fuel use, temperature through the year, plant growth, or a custom shape you can draw on.
- 3
Build the network
Add layers, type the number of neurons, and choose the activation, learning rate, batch size and optimiser.
- 4
Press Start and compare
Watch the green curve bend to fit the points, next to the dashed straight line of classic linear regression.
Features
Linear vs non-linear
See a straight line and a neural network side by side, with both test mistakes.
House price prediction
Add clues like size, age and distance and watch the average mistake fall in dollars.
Real-life curves
U-shapes, waves and S-curves with real units, like km/h, °C and cm.
7 optimisers
SGD, Momentum, AdaGrad, RMSProp, AdaDelta, Adam and Adamax.
Live mistakes chart
Training and test mistakes (MSE) plotted as the model learns.
Made for beginners
A guided lesson in plain words, and a hint under every setting.
Frequently asked questions
What is regression in machine learning?
Regression means predicting a number, like the price of a house or tomorrow's temperature. The model learns from examples where the answer is known, then predicts the number for new ones.
What is the difference between linear and non-linear regression?
Linear regression can only draw a straight line, so it misses patterns that bend, like fuel use being highest at very low and very high speeds. A neural network with hidden layers can bend its line to follow the pattern: that's non-linear regression. Turn on "Compare with a straight line" to see both.
How do more features make predictions more accurate?
In the house price example the model first knows only the size, and its average mistake is about $33k. Add bedrooms, age, distance and garden and it drops to about $20k, because it can now tell apart houses of the same size. A useless clue like door colour doesn't help.
What is MSE?
MSE (mean squared error) is the average of the squared mistakes. It's always zero or more, and lower is better. The test MSE uses examples the model never trained on.
What is overfitting?
Overfitting is when a model learns the training examples by heart instead of the real trend. The curve wiggles through every training point, and the test mistake stays high even as the training mistake falls.
Is there a classification version?
Yes. The Neural Network Classification simulator sorts points into groups instead of predicting numbers.
More free tools
- Typing Speed TestTest your typing speed (WPM) and accuracy, and practise to type faster.
- JSON FormatterFormat, validate, beautify and minify JSON. Find the exact line of any error.
- Markdown ViewerWrite or open a .md file and see the formatted preview live, with tables and checklists.
- Privacy Policy GeneratorCreate a policy template for your website.
- Terms & Conditions GeneratorGenerate an editable terms template.
- QR Business Card GeneratorMake a business card with a QR code that saves your contact to any phone.
- Wi-Fi QR GeneratorMake a QR code guests scan to join your Wi-Fi, with a printable sign.
- Chart MakerUpload a CSV or Excel file, or paste data, and turn it into a clean chart.
- Neural Network ClassificationWatch a neural network learn to sort points into groups, with a step-by-step lesson for beginners.
- Birthday Card MakerCreate a birthday wish card with a name, photo and message, ready to share on WhatsApp.
- Anniversary Card MakerCreate an anniversary wish card with names, a photo and a loving message, ready to share.
- Biodata MakerCreate a marriage biodata with photo in minutes. Download a printable PDF or share it on WhatsApp.