What’s an Algorithm?
Imagine you want to teach a computer to recognise cats and dogs. You give it lots of pictures, and it learns by following a set of step-by-step instructions to find patterns — like pointy ears or fluffy tails.
These instructions are called an algorithm - a recipe a computer follows to solve a problem or complete a task.
In machine learning, algorithms help computers learn from data so they can make predictions or decisions.
🧪 Task: Train Your Own Algorithm
Let’s see how an algorithm learns to separate two types of data - orange and purple dots - based on where you place them.
✅ Your Mission:
- Add some data!
- Pick an algorithm.
- Perceptron
- k-NN
- SVM
- Neural Net
- Click "Train".
- Experiment!
- Add more data and retrain — what changes?
- Mix the data up — can the model still get it right?
- Try each algorithm — which one works best with your data?
Click the graph to place orange points on one side and purple points on the other. Try to make two clear groups.
Try out different ones from the dropdown:
Watch how the algorithm draws a boundary between the orange and purple points.
🤔 Reflect:
- What do you notice about the line or shape the algorithm draws?
- Do all algorithms behave the same way?
- Can the model still make good predictions if the data is messy?