What is Machine Learning?
What is Machine Learning?
Machine Learning (ML) is a branch of artificial intelligence that enables machines to learn from data, without being explicitly programmed.
Why Machine Learning?
Traditional programming approaches require defining explicit rules for every case. ML allows the system to discover these rules automatically from examples.
The Three Types of Learning
graph TD
A[Machine Learning] --> B[Supervised]
A --> C[Unsupervised]
A --> D[Reinforcement]
B --> B1[Classification]
B --> B2[Regression]
C --> C1[Clustering]
C --> C2[Dimensionality Reduction]
D --> D1[Agent + Environment]
Supervised Learning
The model learns from labeled data (input → expected output).
from sklearn.linear_model import LinearRegression
# Training data
X = [[1], [2], [3], [4]] # surface in m²
y = [100, 200, 300, 400] # price in k€
model = LinearRegression()
model.fit(X, y)
print(model.predict([[5]])) # Prediction for 5 m²
Unsupervised Learning
The model finds hidden structures in unlabeled data (clustering, dimensionality reduction).
Reinforcement Learning
An agent learns by interacting with an environment and receiving rewards.
Real-World Applications
- Recommendation: Netflix, Spotify
- Computer Vision: facial recognition, medical diagnosis
- Natural Language Processing: machine translation, chatbots
- Finance: fraud detection, algorithmic trading
Summary
Machine Learning enables solving complex problems by learning directly from data. In the next chapter, we will see how to prepare this data.