Skip to main content
Welcome. This lesson explains the three primary machine learning paradigms—supervised learning, unsupervised learning, and reinforcement learning—highlighting their goals, data requirements, common algorithms, and practical use cases. Each section includes examples and diagrams to clarify how the methods work and when to choose them.

Supervised learning

Supervised learning trains models on labeled data, where each input example has a corresponding target (label). The model’s objective is to learn a mapping from inputs (features) to outputs (labels) so it can predict labels for new, unseen inputs. Common supervised tasks:
  • Classification — categorical outputs (e.g., spam vs. not spam; cat vs. dog).
  • Regression — continuous outputs (e.g., house prices, credit scores).
Typical supervised algorithms:
  • Linear/logistic regression, decision trees, random forests, support vector machines, gradient boosting (XGBoost, LightGBM), and neural networks.
Practical considerations:
  • Requires labeled training data; labels can be expensive to obtain.
  • Performance is measured with metrics like accuracy, precision/recall, F1, ROC AUC (classification) or MAE/MSE/R2 (regression).
  • Models need maintenance and retraining to handle concept drift (when the underlying data distribution changes).
Common supervised examples:
  • Predicting house prices using features such as square footage, location, and number of bedrooms.
  • Email spam detection using labeled emails to classify new messages.
  • Credit scoring to estimate default risk or creditworthiness from historical customer data.
The image is a slide titled "Supervised Learning Example – Email Spam Detection" showing a computer monitor filled with envelopes and alert icons. It visually represents email messages and spam warnings being processed on a screen.
Supervised systems frequently require ongoing collection of labeled examples so models remain robust as behaviors and patterns evolve.
The image is a slide titled "Supervised Learning Example — Credit Scoring in Financial Institutions." It shows a stylized computer screen displaying a credit score gauge with coins and financial icons around it.

Unsupervised learning

Unsupervised learning finds structure in unlabeled data. Instead of predicting labels, these methods discover patterns, compress representations, or flag unusual observations. Key unsupervised tasks:
  • Clustering — group similar instances (e.g., customer segmentation).
  • Dimensionality reduction — reduce feature space for visualization or downstream models (PCA, t-SNE, UMAP).
  • Anomaly detection — identify unusual or outlier data points (useful in monitoring and security).
When to use unsupervised learning:
  • You lack labeled examples or labels are costly to obtain.
  • You want to explore data, generate features, or detect novel events.
Evaluation methods:
  • Internal metrics: silhouette score, Davies–Bouldin index (for clustering).
  • Reconstruction error or log-likelihood (for autoencoders, probabilistic models).
  • Domain validation: manual inspection, A/B tests, or downstream supervised tasks.
A diagram titled "Unsupervised Learning" showing unlabeled input images of cats and dogs passing through a central model and being grouped into output clusters. The graphic illustrates how the model organizes similar animal images without labels.
Anomaly detection is a common unsupervised application in cybersecurity and operations. These systems must be tuned to balance false positives and false negatives and are often improved using feedback or partial labels.
A dashboard screenshot titled "Unsupervised Learning Example – Anomaly Detection in Cybersecurity" showing time-series line and shaded area charts of network traffic (bytes) over time. A context menu is open highlighting an "Anomaly Detection" option and an expected-range overlay appears on the chart.

Reinforcement learning

Reinforcement learning (RL) trains an agent to make sequential decisions by interacting with an environment and maximizing cumulative reward. RL is ideal for problems where actions influence future states and outcomes. Core RL components:
  • Agent — the learner/decision-maker.
  • Environment — everything the agent interacts with.
  • State — the current observation or context the agent receives.
  • Action — a decision the agent can take.
  • Reward — scalar feedback indicating immediate desirability.
  • Policy — the strategy mapping states to actions.
  • Value function / learning algorithm — how the agent estimates expected returns and updates the policy.
Common RL applications:
  • Game playing (chess, Go, video games) — where rewards and rules are well-defined.
  • Robotics — learning control policies for manipulation and navigation.
  • Traffic signal control — optimizing timings to reduce congestion.
  • Recommendation systems — modeled as bandits or RL when sequential feedback matters.
A diagram titled "Reinforcement Learning" showing an agent (with Policy and Learning Algorithm blocks) interacting with an Environment block. Arrows indicate the agent taking Actions, the Environment returning state changes, and the Learning Algorithm performing Policy Updates.
Practical notes on RL:
  • RL typically requires many interactions (data/simulations) and careful exploration-exploitation balancing.
  • Safe exploration and well-defined reward shaping are crucial to avoid unintended behaviors.
  • Simulators and transfer learning can reduce real-world sample complexity.
Reinforcement learning can be resource-intensive to train and risky to deploy without safety checks. Use simulations, constraints, and rigorous testing before applying RL in production environments.

Comparison summary

Further reading and references
These are foundational concepts for understanding AI and ML. They differ in required data, objectives, and evaluation. Make sure you understand the distinctions and representative examples — this is essential for practical applications.

Watch Video