Basic Concepts

1. What is Machine Learning?

Machine learning (ML) is a field of artificial intelligence that focuses on building systems that can learn patterns from data and improve their performance on a task without being explicitly programmed.

Instead of relying on hard-coded rules, ML systems use algorithms to map inputs (features) to outputs (predictions or decisions).

At its core, ML answers the question:

“Given data, how can we design models that improve through experience?”


2. Common Learning Methods

Machine learning can be categorized in different ways. Two common perspectives are based on the learning target and based on the learning strategy.

2.1 Based on Learning Target

  • Supervised Learning
    Learn from labeled data (input–output pairs).
    Examples: image classification, house price prediction.

  • Unsupervised Learning
    Learn from unlabeled data by finding hidden structures.
    Examples: clustering customers, reducing dimensions (PCA).

  • Self-supervised Learning
    Learn supervisory signals from the data itself (a hybrid of supervised + unsupervised).
    Examples: predicting masked words in a sentence (BERT), contrastive learning.

  • Reinforcement Learning (RL)
    Learn by interacting with an environment, receiving feedback as rewards or penalties.
    Examples: game-playing agents, robotic control.

2.2 Based on Learning Strategy

  • Parametric vs. Non-parametric Models

    • Parametric: fixed number of parameters regardless of dataset size (e.g., linear regression, neural networks).
    • Non-parametric: model complexity grows with data (e.g., k-Nearest Neighbors, decision trees).
  • Generative vs. Discriminative Models

    • Generative: model how data is generated (e.g., Naive Bayes, Variational Autoencoders).
    • Discriminative: focus only on decision boundaries between classes (e.g., logistic regression, SVM).
  • Online vs. Batch Learning

    • Batch: train once on the whole dataset.
    • Online: update incrementally as new data arrives.

3. Key Components of Machine Learning

These are the core pillars of ML, which are also fundamental for deep learning. Each links to a dedicated section:

  • Data — the foundation; includes features, labels, preprocessing, and data quality.
  • Model — the function or algorithm that learns patterns from data.
  • Training — the process of fitting the model to data, often involving optimization.
  • Evaluation — assessing how well the model generalizes using appropriate metrics.

💡 Together, these sections set the stage for deeper dives into data, models, training, and evaluation in the upcoming chapters.