Neural Networks (Supervised Learning)

Supervised learning — someone must have looked and labeled things beforehand. That person is usually underpaid.

Sharlock's Detection Laboratory

🔍❌❔
Click to add evidence points. Use arrow keys for navigation.
Click to add evidence points, spacebar to change type, enter to train
Genuine Clues Red Herrings Uncertain Evidence
Decision Boundary The line where the network flips from clue to red herring (prediction exactly 50:50). It is the learned dividing line.

Moriarty's Ring

★★★★★

Diabolical! The genuine clues form a ring around the crime scene, the red herrings lie outside. A straight line will not do — the network needs to bend.

Learning goal: Observe how the hidden layer creates non-linearity. Expect ~90%, not 100%. (expected ~90%)

Controls
Evidence Collection
Parameters
How far the network nudges its weights each step. Small learns calmly and stably; large learns fast but can overshoot the target.
How big each learning step is. Low = stable but slow; high = fast but may overshoot the optimum.
How many training steps run per second while auto-training is on. This is only animation pace, not learning quality.
Controls how fast the neural network training animation runs
Loss TrendLoss measures how far the predictions are still off. When the curve falls, the network is learning.0.0000
Shows the loss for the last 60 training steps — falling = network is learning.
Sharlock's Neural Deduction Network

Help Sharlock Helmes learn to distinguish genuine clues from red herrings by training a neural network. Click on the canvas to add data points and watch how the network learns from your examples. The visualization shows how Sharlock's artificial neural network processes evidence: input neurons receive coordinates, hidden neurons analyze patterns, and the output neuron determines whether a piece of evidence is a clue or a red herring from Dr. Moriarty.

What you see on the investigation field

Here Sharlock Helmes learns to tell real clues from red herrings — not from fixed rules, but from known examples. Here is what the picture shows.

What you see
A square investigation field with points in two classes: blue clues and red herrings. The background is filled as a coloured area and splits the field into two regions — one blue, one red. Where blue turns into red, the dividing line runs. Next to it, a small diagram shows the neural network that makes this split.
What happens
From a few points with a known answer the model draws a first rough border. With every training step the coloured area shifts, until the line cleanly separates the blue points from the red ones. The more examples you give, the sharper and better-fitting the transition between the colours becomes.
What you can do
Pick an evidence type at the top and click to place new points on the field. Train in single steps or automatically, adjust the learning rate and speed, or load a ready-made case from Sharlock's case file. Reset clears the field.
What to watch for
Supervised learning means drawing a rule from known examples that come with an answer. Watch that the final border also sorts new, not-yet-placed points correctly — not just the ones it learned from.

Definition

Neural Networks (Supervised Learning)

Analogy

Imagine Sharlock Helmes had to learn the craft of deduction - methodically, systematically, with the precision of a Swiss clockwork. A mentor shows him hundreds of pieces of evidence, each labeled as either 'genuine clue' or 'red herring'. Through this guided training, Sharlock develops an intuitive understanding of what makes evidence reliable. His arch-nemesis, Dr. Moriarty, constantly tries to mislead him with false clues. This is exactly how supervised learning works: algorithms learn from labeled examples to make accurate predictions about new, unknown data.

This interactive demonstration shows supervised learning in action. You provide labeled examples (clues vs. red herrings), and the neural network learns to classify new evidence. The system uses backpropagation to adjust weights and improve its decision-making over time.

Important Parameters
  • Learning Rate: Controls how quickly the network adapts to new information. Higher values learn faster but may overshoot optimal solutions.
  • Training Speed: Determines how many learning steps per second are executed during automatic training. Adjust to observe learning patterns at different speeds.
  • Evidence Types: Three categories: Clues (genuine evidence), Red Herrings (misleading clues), and Uncertain (unlabeled data for testing predictions).
Visualization Elements

The demo offers multiple ways to understand how the neural network makes decisions and learns from your data.

  • Data Points: Blue circles represent clues, red circles are red herrings, and gray circles show uncertain evidence with prediction borders.
  • Decision Boundary: The colored regions show where the network would classify evidence as clues (blue) or red herrings (red), with opacity indicating confidence.
  • Neural Network: Visual representation of the 2-3-1 network architecture showing nodes, connections, and real-time weight updates during training.
Tips for Effective Training
  • Start with some clear examples in each category to establish basic patterns.
  • Add uncertain points to test the network's predictions on unlabeled data.
  • Watch the accuracy indicator - it should improve as you add more diverse training examples.
  • Experiment with different learning rates to see how they affect convergence speed and stability.

TheoryPseudo-CodeStep by StepFlow Diagram

Learning with a Teacher

Supervised Learning is like learning with a teacher: The model receives labeled training data - examples with the correct answer. It learns to map inputs (features) to outputs (labels) by recognizing patterns in the training data.

Training occurs iteratively: The model makes predictions, compares them with the true labels, calculates the error, and adjusts its parameters to minimize the error. This process repeats until the model makes good predictions.

Classification vs. Regression

Classification: Predicting categories (e.g. spam/not-spam, cat/dog). Regression: Predicting continuous values (e.g. house prices, temperature).

Advantages

  • Precise predictions: Very accurate with good training data
  • Well understood: Established methods and best practices
  • Measurable performance: Clear metrics (Accuracy, F1-Score, etc.)
  • Broad applicability: Works for many problem types

Challenges

Requires many labeled data - labeling is expensive and time-consuming. Overfitting (too good adaptation to training data) and underfitting (too simple models) are common problems. Data quality is crucial.

Practical Applications

Image and speech recognition, spam filters, medical diagnosis, credit risk assessment, stock price prediction, recommendation systems, and autonomous driving.

Try the demo! Train a model and see how it learns from examples.

Check

Supervised Learning Quiz

Not completed

What is the main goal of supervised learning?

Select all that apply

Answer Key: 1) B · 2) C · 3) C · 4) B · 5) B · 6) B

Plain Language

This preview is in Plain Language. The whole portal is also available in Plain Language. You can change the language at the top. Or use the button below. Our Plain Language texts are AI-assisted and editorially reviewed. They follow the core principles of easy-to-read language, but they are not certified Easy Read: a review panel of people with learning difficulties does not test them.

Preview: Supervised learning: interactive demo

What is shown?

Here you train a neural network. Neural network means: an AI system with calculation levels. You click example points onto a surface. The network learns from this and sorts new points.

How does the demo work?

Click on the surface. This is how you add points. There are real clues and false leads. Press start training. Then the network learns.

What you learn from this?

This is called supervised learning. Supervised learning means: a model learns from examples with known answers. You see how the network gets better.