Supervised Learning

Supervised learning is a fundamental paradigm in Machine Learning where an algorithm is trained on a labeled dataset consisting of input-output pairs. The algorithm learns a mapping function from inputs to outputs, guided by a “teacher” or “ground truth” to minimize prediction errors.

Key Features

  • Labeled Data: The training data contains both input features and their corresponding correct output labels (ground truth).
  • Mapping Function: The goal is to approximate the function that maps input variables () to output variables ().
  • Generalization: The model’s performance is measured by its ability to accurately predict outcomes for new, unseen data rather than just memorizing the training set.
  • Feedback Loop: During training, predictions are compared with the actual labels using a loss function, and model parameters are adjusted (e.g., via gradient descent) to minimize error.

Primary Tasks

  1. Classification: Predicting discrete class labels or categories (e.g., spam vs. not spam, image recognition).
  2. Regression: Predicting continuous numerical values (e.g., predicting housing prices or stock market values).

Key Algorithms

  • Linear & Logistic Regression: Basic models for continuous and binary output predictions respectively.
  • Decision Trees & Random Forests: Tree-structured classifiers and regression models.
  • Support Vector Machines (SVM): Classifiers that find optimal hyperplanes to separate classes.
  • Neural Networks: Multi-layered structures used in Deep Learning to capture complex non-linear patterns.
  • Bias-Variance Tradeoff: Balancing model complexity to avoid high bias (underfitting) or high variance (overfitting).
  • Overfitting & Underfitting: Generalization failures where a model is too complex or too simple.
  • Feature Engineering: Selecting and transforming raw data to improve model performance.