Machine Learning Β· Chapter 1 of 40

What is Machine Learning?

Machine Learning (ML) is a subset of AI where models LEARN patterns from data instead of being explicitly programmed with rules.

Given examples of inputs and outputs, an ML algorithm finds a function that maps them β€” and generalises to new, unseen inputs.

Example 1 (python)
# Traditional programming: rules -> output
# ML: data -> rules (a model)
from sklearn.linear_model import LinearRegression
model = LinearRegression()

The scikit-learn library provides ready-to-use ML models.

Example 2 (python)
# Everyday ML: spam filter, product recs, face unlock

ML powers apps you use daily.

Key points

  • ML learns patterns from data.
  • Different from rule-based programming.
  • Needs quality training data.
  • Powers recommendations, translation, vision.
πŸ’‘ Note: ML is not magic β€” bad data produces bad models. 'Garbage in, garbage out' applies strongly.

πŸ“ Quick Quiz

1. ML models learn from:

2. ML is a subset of:

3. Which is an ML application?