Skip to content
All apps

Machine learning paradigms

About this app

The three types of machine learning on concrete cases: learn a spam filter from labelled emails and watch accuracy grow with the number of labels, let the same emails group themselves without labels, and train a robot vacuum to find its charging station with nothing but praise and penalty.

Three ways to learn

Machine learning derives a rule from data instead of programming it by hand. The three learning types differ in their feedback. In supervised learning the training data contain the right answer, the label, and the model learns to classify new cases. In unsupervised learning there are no answers; the model bundles similar cases, for example with k-means. In reinforcement learning an agent tries out actions and only receives reward or penalty, from which it learns a strategy.

What the app shows

Supervised and unsupervised use the same 90 emails, plotted by links and exclamation marks. Supervised: some are labelled spam or not spam, a logistic regression learns a dividing line, and the app checks on the held-back test emails without a label how many are classified correctly, split into true and false positives and negatives (positive = spam). Unsupervised: k-means searches for groups round by round; with three groups, personal mail, newsletters and spam emerge without the machine being able to name them. Reinforcement: a robot vacuum learns the way to its charging station with Q-learning, and a learning curve shows the steps per attempt.

Try it yourself

Change the number of labelled emails and watch the hit rate: with two labels it is close to guessing, with sixty clearly higher. Click into the plot to have a new email classified. Set two, three or five groups, run the search step by step and compare the groups side by side with the true labels. Let the robot practise, add walls by clicking and watch it relearn. A comparison sums up what each type gets, what it can do afterwards and where its catch lies.

Frequently asked questions

What is the difference between supervised and unsupervised learning?
In supervised learning the training data contain the desired answers, and the model learns to map inputs to them, as in classification or regression. In unsupervised learning these answers are missing; the model finds structure such as groups by itself, but cannot name them.
What is reinforcement learning?
In reinforcement learning an agent tries actions in an environment and receives rewards or penalties. From these it learns a strategy that maximises the sum of future rewards. Examples are game engines, robots and fine-tuning chatbots with human feedback (RLHF).
Why does supervised learning need many labelled examples?
From a few examples the boundary between classes can only be estimated roughly, and chance in the selection shifts it a lot. With more labelled examples the estimate becomes stable and accuracy on new cases rises. Labelling is often the most expensive part of a project.
What can I try in the app?
You set the number of labelled emails and see the hit rate and the kinds of error on the test emails, have new emails classified by clicking, search for groups without labels and compare them with the true labels, and let a robot practise with praise and penalty, even after you have moved walls.

Subject: Machine Learning

More from Machine Learning

A VisuApp by heyprof: interactive, free in your browser, no sign-up. What is a VisuApp? · All apps