Current Section

Overview

0%

← Back to AI Foundations
AI Foundations · Chapter 2

What is Machine Learning?

Understand how computers learn patterns from historical data and use those patterns to make predictions about new situations.

Beginner8–10 min readAI Foundations

What you will learn

✓What Machine Learning means in simple terms
✓How models learn patterns from historical data
✓The three main types of Machine Learning
✓How ML differs from traditional programming
✓Where Machine Learning is used in real organisations
✓Why data quality and evaluation are critical

30-second explanation

Machine Learning allows software to discover patterns from examples instead of requiring humans to write every rule manually.

A model studies historical data, learns relationships inside that data, and applies those relationships when it receives new information.

Historical data → Learn patterns → Evaluate the model → Predict new outcomes

Understand

Traditional programming vs Machine Learning

The key difference is how the system obtains its rules.

Traditional software

A developer writes explicit rules that tell the software exactly how to respond.

Rules + Input
↓
Output

Example: If the order value exceeds €50, apply free delivery.

Machine Learning

The system examines examples and learns useful rules or relationships from the data.

Examples + Correct outcomes
↓
Learned model

Example: Learn which transactions are likely fraudulent based on previous fraud cases.

Visualize

How Machine Learning works

Most Machine Learning projects follow a repeating lifecycle rather than ending after the first model is trained.

01

Collect

Gather historical examples related to the problem you want to solve.

02

Prepare

Clean the data, handle missing values, and select useful information.

03

Train

Allow an algorithm to discover patterns from the training examples.

04

Evaluate

Test how accurately the model performs on data it has not seen before.

05

Predict

Use the trained model to make predictions on new real-world inputs.

Important: A deployed model must continue to be monitored because real-world data and user behaviour can change.

Simple example

Predicting the price of a house

Suppose you want to estimate the selling price of a property. You provide the model with historical house-sale data.

Input features

Location, floor area, property age, number of rooms, and energy rating.

Known answer

The actual selling price of every historical property.

Learned patterns

The model discovers how different property features affect price.

New prediction

It estimates the value of a property it has never seen before.

The model does not understand houses like a human.

It finds mathematical relationships between the available inputs and previous selling prices. Its result is only as reliable as its data and evaluation process.

Explore

Three main types of Machine Learning

1Supervised learning+

The model learns from examples where the correct answer is already known.

Example

Train on previous emails labelled as spam or not spam, then classify new emails.

ClassificationPrice predictionRisk scoring
2Unsupervised learning+

The model explores data without predefined answers and discovers hidden structures or groups.

Example

Analyse customer behaviour and automatically group customers with similar purchasing patterns.

ClusteringPattern discoveryAnomaly detection
3Reinforcement learning+

The system learns by taking actions and receiving rewards or penalties based on the outcome.

Example

Train a robot to navigate a room by rewarding successful movement and penalising collisions.

RoboticsGame playingDecision optimisation

Use

Where Machine Learning is used

Machine Learning is most useful when historical data contains patterns that can help predict or classify future situations.

Fraud detection

Banks analyse transaction patterns to identify unusual or potentially fraudulent activity.

Recommendations

Streaming and shopping platforms predict which products, videos, or songs a person may prefer.

Predictive maintenance

Factories analyse machine sensor data to predict failures before equipment stops working.

Medical support

Models help identify patterns in scans, laboratory results, and patient histories.

Spam filtering

Email systems classify incoming messages based on patterns learned from previous examples.

Demand forecasting

Businesses predict future product demand using historical sales and market information.

Compare

AI, Machine Learning, and Deep Learning

These terms are related, but they do not mean exactly the same thing.

Artificial Intelligence

The broad field of building machines that perform tasks associated with intelligence.

Machine Learning

A branch of AI in which systems learn patterns from data.

Deep Learning

A specialised area of Machine Learning based on multi-layer neural networks.

Deep Learning is part of Machine Learning, and Machine Learning is part of Artificial Intelligence.

Consider Machine Learning when

  • ✓ You have enough relevant historical data.
  • ✓ The required rules are difficult to define manually.
  • ✓ The problem involves prediction or classification.
  • ✓ Patterns may change as new data becomes available.
  • ✓ Predictions create measurable business value.

A normal rule may be better when

  • • The business logic is simple and fully known.
  • • Exact and predictable behaviour is required.
  • • Very little usable data is available.
  • • A mistake would create unacceptable risk.
  • • The cost of training and monitoring exceeds the benefit.

Avoid

Why Machine Learning projects fail

Selecting an algorithm is only one small part of delivering a reliable Machine Learning system.

Poor-quality data

Incomplete, incorrect, or outdated training data produces unreliable models.

Biased examples

A model may repeat or amplify unfair patterns that already exist in its training data.

Overfitting

The model memorises its training examples but performs poorly on new situations.

Wrong success metric

A model can look successful statistically while still failing the actual business objective.

Data drift

Real-world behaviour changes over time, making an older model less accurate.

No human oversight

High-impact decisions should not rely blindly on predictions without review and controls.

Key takeaway

Machine Learning converts historical examples into a model that can make useful predictions.

The algorithm matters, but successful Machine Learning depends just as much on problem selection, data quality, evaluation, deployment, monitoring, and responsible human oversight.

Remember the basic pattern:

Learn from previous examples → validate on unseen data → use the model carefully on new situations.

Continue Learning

Related Lessons & Next Steps

Explore more practical AI guides from AIMates.

Stay in the loop

Get practical AI tutorials, frameworks, and real-work insights.