Definition

Machine Learning (ML) is a field of artificial intelligence (AI) where computers learn patterns from data and improve performance without being explicitly programmed.

  • Instead of writing rules by hand, we give the system examples (data).
  • The model learns relationships between inputs (features) and outputs (labels).
  • Once trained, it can make predictions on new, unseen data.

Core Idea

$\text{Model: } y = f(X) + \epsilon$

  • $X$ = input features
  • $y$ = output (prediction)
  • $f(\cdot)$ = function learned from data
  • $\epsilon$ = error/noise

Types of Machine Learning

  1. Supervised Learning
    • Learn from labeled data (input → correct output).
    • Tasks:
      • Regression → predict continuous value (house price, temperature).
      • Classification → predict categories (spam/not spam, disease/healthy).
  2. Unsupervised Learning
    • Learn from unlabeled data (no given output).
    • Tasks:
      • Clustering → group similar data (customer segmentation).
      • Dimensionality Reduction → compress features (PCA, embeddings).
  3. Semi-Supervised Learning
    • Mix of labeled + unlabeled data.
    • Common when labels are expensive (medical images).
  4. Reinforcement Learning (RL)
    • Agent learns by interacting with environment and receiving rewards.
    • Example: AlphaGo, robotics, recommendation systems.
  5. Self-Supervised Learning (modern deep learning trend)
    • Model learns from raw data by predicting part of the input from other parts (e.g., masked words in BERT).
    • Core idea behind LLMs like GPT.

Applications

  • Computer Vision: image classification, object detection, medical imaging.
  • Natural Language Processing (NLP): chatbots, translation, summarization.
  • Healthcare: disease prediction, drug discovery.
  • Finance: fraud detection, algorithmic trading.
  • E-commerce: recommendation systems.
  • Autonomous Systems: self-driving cars, robotics.

Workflow in ML

  1. Collect data
  2. Clean & preprocess
  3. Choose model (linear regression, decision tree, neural net, etc.)
  4. Train model (optimize weights)
  5. Evaluate on test data
  6. Deploy to production
  7. Monitor & retrain (continuous learning)

Example

  • Input: house size (1000 sqft), number of rooms (3).
  • Output: price = $250,000.
  • Train ML model on thousands of such examples.
  • Model learns: price increases with size & rooms.
  • Later → given new input (1200 sqft, 4 rooms), model predicts price ≈ $300,000.

Why It Matters

  • Automates pattern discovery.
  • Handles massive, complex datasets humans can’t.
  • Powers modern AI systems (LLMs, vision models, recommender systems).

Summary
Machine Learning = teaching computers to learn patterns from data and make predictions without explicit programming.

  • Main types: supervised, unsupervised, reinforcement.
  • Applications: vision, NLP, healthcare, finance, e-commerce.