Core Machine Learning Algorithms — Supervised & Unsupervised Learning

Machine learning is the engine behind AI. Instead of writing rules by hand, you give the computer data and let it figure out the patterns on its own. In this phase you will go from understanding what ML is to building, evaluating, and improving your first real models.

🎯
Goal

Build models that predict and classify from data

⏱️
Time

6 – 10 weeks

🛠️
Tools

Python, Scikit-Learn, Pandas, Matplotlib

🧠 See How a Model Learns

Drag the blue dot to add a data point. Watch the decision boundary update in real time.

What is Machine Learning?

Traditional programming says: "if the email contains 'free money', mark it spam." Machine learning says: "here are 10,000 spam emails and 10,000 real emails — you figure out the rules."

The model looks at features (word counts, sender info, links) and adjusts internal numbers called weights until it can tell spam from real mail with high accuracy. No human writes the rules — the model learns them from data.

Training Data

Examples the model learns from. Each example has features (inputs) and a label (the answer).

Model

A mathematical function with adjustable parameters. It maps inputs → predictions.

Loss Function

Measures how wrong the model is. Training tries to minimise this number.

Optimiser

Algorithm (like Gradient Descent) that adjusts weights to reduce the loss.

The Three Learning Paradigms

There are three main ways a model can learn, depending on whether you give it labels:

ParadigmLabels?Example Use CaseCommon Algorithms
Supervised ✅ Yes Predict house prices, detect spam Linear Regression, SVM, Random Forest
Unsupervised ❌ No Group customers, find anomalies K-Means, PCA, DBSCAN
Reinforcement 🏆 Rewards Game playing, robotics, trading Q-Learning, PPO, A3C

Topics in This Phase

Click any topic below to dive into the full guide:

The ML Workflow

Every ML project follows the same high-level steps, regardless of complexity:

1
Define the Problem

What are you predicting? What counts as success? What data do you have?

2
Collect & Explore Data

Load data, check distributions, find missing values, visualise relationships.

3
Feature Engineering

Clean, transform, and create features that help the model learn.

4
Train a Model

Choose an algorithm. Fit it to your training data. Save it.

5
Evaluate & Improve

Check metrics on validation data. Tune hyperparameters. Repeat.

6
Deploy

Expose the model as an API. Monitor performance in the real world.

💡 Beginner Tip

Don't jump to deep learning yet. Traditional ML algorithms like Random Forest and Gradient Boosting still win on structured/tabular data in competitions and real projects. Master them first.

Frequently Asked Questions

Do I need a maths degree to do ML?

No. You need basic linear algebra, calculus, and statistics (covered in Phase 1). Most of the hard maths is implemented inside libraries like Scikit-Learn. Understanding the concepts matters more than being able to derive them by hand.

How is ML different from AI?

AI is the broad goal: making machines intelligent. ML is one technique to achieve it — using data and statistics to let machines learn patterns. Deep Learning is a subset of ML. So: AI ⊇ ML ⊇ Deep Learning.

What language should I use?

Python is the industry standard for ML. It has the best libraries (Scikit-Learn, PyTorch, TensorFlow), the largest community, and the most job listings. R is used in academia and statistics, but Python is the practical choice.

How long does it take to learn ML?

With consistent effort (1–2 hours/day), expect 3–6 months to become job-ready in traditional ML. Deep learning and LLMs take an additional 3–6 months. The more projects you build, the faster you learn.

Frequently Asked Questions

What will I learn here?

This page covers the core concepts and techniques you need to understand the topic and progress confidently to the next lesson.

How should I use this page?

Start with the overview, then follow the section links to deepen your understanding. Use the table of contents on the right to jump to specific sections.

What should I read next?

Use the navigation below to continue to the next lesson or explore related topics.