




























































































Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
This page cannot be seen from the preview
Don't miss anything!





























































































Machine learning is the subfield of artificial intelligence concerned with the design and
analysis of algorithms that allow computer systems to improve their performance on a
given task through experience — typically in the form of data — rather than through
explicit, hand-coded instructions for every possible situation. The formal, most frequently
examined definition is due to Tom Mitchell: “A computer program is said to learn from
experience 𝐸 with respect to some class of tasks 𝑇 and performance measure 𝑃, if its
performance at tasks in 𝑇, as measured by 𝑃, improves with experience 𝐸.” This definition
is dense and every one of its three components — task, experience, performance measure
— is independently examinable, since a correct answer must be able to instantiate all three
for any given learning problem (e.g., for spam classification: 𝑇 = classifying emails as
spam/not-spam, 𝐸 = a corpus of labelled emails, 𝑃 = classification accuracy on unseen
emails).
The historical evolution of machine learning is commonly presented as a sequence of
overlapping eras, each defined by a dominant methodological paradigm. The earliest era,
from the 1950s, was characterized by cybernetics and early neural models — Frank
Rosenblatt’s Perceptron (1958) being the paradigmatic example, an early trainable linear
classifier directly inspired by a simplified model of a biological neuron. This was followed,
from the mid-1960s through the 1970s, by a period often called the “AI winter” for neural
approaches specifically, triggered substantially by Minsky and Papert’s 1969 book
Perceptrons , which mathematically demonstrated the single-layer perceptron’s inability to
learn non-linearly-separable functions (the canonical example being the XOR function),
causing research funding and interest in neural approaches to decline sharply for over a
decade. The 1970s–1980s saw the rise of symbolic AI and knowledge-based/expert
systems , which relied on explicitly hand-encoded rules and logical inference rather than
learning from data — a paradigm now understood as fundamentally distinct from, and a
historical precursor/contrast to, statistical machine learning. The mid-1980s witnessed a
resurgence of neural approaches with the popularization of the backpropagation
algorithm (Rumelhart, Hinton, and Williams, 1986), which solved the training problem for
multi-layer networks and thereby directly overcame the XOR limitation that had stalled the
field. The 1990s through the 2000s were dominated by statistical learning theory and
kernel methods , epitomized by the Support Vector Machine (Vapnik and Cortes, 1995),
alongside the maturation of decision-tree ensembles (Random Forests, Boosting). Finally,
from the early 2010s onward, the deep learning era emerged, driven by the convergence
of large labelled datasets (e.g., ImageNet), GPU-accelerated parallel computation, and
refined training techniques, dramatically advancing performance on perception tasks such
as image and speech recognition.
Beyond this historical timeline, examiners expect a clear grasp of the paradigms of
machine learning , classified principally by the nature of the “experience” (training signal)
available to the learner. Supervised learning uses a training set of labelled input–output
pairs {(𝑥
𝑖
𝑖
)}, and the learning algorithm’s task is to infer a function 𝑓: 𝑋 → 𝑌 that
generalizes correctly to unseen inputs; this paradigm further subdivides into classification
(where 𝑌 is a discrete, categorical set of classes) and regression (where 𝑌 is a continuous
real-valued quantity). Unsupervised learning uses only unlabelled input data {𝑥
𝑖
}, with
the algorithm’s task being to discover latent structure — such as groupings (clustering),
lower-dimensional representations (dimensionality reduction), or the underlying
probability distribution (density estimation) — without any externally provided “correct
answer” to learn against. Reinforcement learning , treated in dedicated depth later in this
topic, is a distinct paradigm in which an agent learns a behavior policy through trial-and-
error interaction with an environment, guided by scalar reward feedback rather than
labelled examples. A further, increasingly examined intermediate paradigm is semi-
supervised learning (using a small amount of labelled data combined with a larger pool of
unlabelled data) and self-supervised learning (generating supervisory labels
automatically from the structure of the unlabelled data itself, a technique foundational to
modern large-scale pretraining).
Within the space of learning strategies specifically (as distinct from the
supervised/unsupervised/reinforcement taxonomy above), classical AI and machine-
learning pedagogy additionally distinguishes learning methods by how generalization is
achieved from experience — most notably contrasting learning by rote and learning by
induction , the two specific mechanisms named in this syllabus and treated in dedicated
depth as Technical Pillar topics below, since they represent foundational, conceptually
opposite ends of a spectrum running from pure memorization to genuine generalization.
Performance measure 𝑃) and the ability to instantiate all three components for any
given learning problem.
(1969) → symbolic AI era → backpropagation resurgence (1986) → statistical
learning/SVM era (1990s–2000s) → deep learning era (2010s onward).
Era
Approximate
Period Defining Development
Statistical learning /
kernel methods
1990s–2000s Support Vector Machines (Vapnik & Cortes,
1995); Random Forests, Boosting
Deep learning era 2012 – present Large labelled datasets (ImageNet) + GPU
compute + refined training techniques drive
breakthroughs in perception tasks
The XOR problem (memorize as a specific, concrete worked example — very
frequently tested as it is the canonical illustration of the perceptron’s limitation):
The XOR (exclusive-OR) function is defined as: 𝑓
separated by any single straight line — the classes are not linearly separable. Since a
single-layer perceptron can only learn a linear decision boundary, it provably cannot
represent the XOR function, regardless of how its weights are trained — this was the
specific mathematical result Minsky and Papert demonstrated in 1969, and it required the
introduction of a hidden layer (a multi-layer perceptron) with a non-linear activation
function, trainable via backpropagation, to resolve.
Paradigms of ML — comparison table (memorize exactly — the core essay content
for this topic):
Paradigm
Nature of “Experience”
(𝐸) Goal Example
Supervised
learning
Labelled input–output
pairs {(𝑥
𝑖
𝑖
Learn a function
𝑓: 𝑋 → 𝑌 that
generalizes to unseen
inputs
Email spam
classification
Classification
𝑌 is discrete/categorical Predict a class label Digit recognition
— Regression 𝑌 is continuous/real-
valued
Predict a numeric
quantity
House price
prediction
Unsupervised
learning
Unlabelled inputs {𝑥
𝑖
only
Discover latent
structure (groupings,
lower-dimensional
representations,
density)
Customer
segmentation via
clustering
Reinforcement
learning
Sequential agent–
environment interaction
with scalar reward
feedback
Learn a policy
maximizing
cumulative reward
Game-playing
agents, robotic
control
Semi-
supervised
learning
A small labelled set + a
larger unlabelled set
Leverage unlabelled
data to improve on
what a small labelled
Labelling a few
images manually,
Paradigm
Nature of “Experience”
(𝐸) Goal Example
set alone could
achieve
using many more
unlabelled ones
Self-supervised
learning
Labels automatically
generated from the
unlabelled data’s own
structure
Learn general-purpose
representations
without manual
labelling
Predicting masked
words in a
sentence
Learning by Rote vs. Learning by Induction (memorize this precise distinction — the
specific pair of terms named in the syllabus, and a frequently tested contrast): -
Learning by Rote: The simplest form of learning, consisting of directly memorizing
specific input–output pairs (facts or experiences) exactly as presented, with no
generalization to inputs not previously seen. A rote learner can only correctly respond to
exact repeats of previously seen instances; it possesses zero predictive power on novel,
unseen inputs. Formally, rote learning can be understood as constructing a simple lookup
table mapping each seen instance to its associated outcome. - Learning by Induction: A
generalization-based form of learning in which the learner extracts a general rule, pattern,
or function from a finite set of specific training examples, such that the induced rule can
then be correctly applied to novel, previously unseen instances. Inductive learning is the
foundation of essentially all practically useful supervised machine learning, since real-
world deployment requires generalizing beyond the exact training examples observed.
Inductive learning inherently relies on an inductive bias — a set of assumptions the
learning algorithm makes about the nature of the target function (e.g., “prefer
simpler/smoother functions”) — since, without such bias, generalization from finite
examples to infinite possible inputs is not deductively guaranteed and is subject to the “no
free lunch” theorem discussed further in Topic 6.
Key exam sentence on rote vs. induction (memorize verbatim): “Learning by rote is
pure memorization of previously seen instances with no generalization capability, whereas
learning by induction extracts a general rule from a finite set of examples that can be
correctly applied to novel, unseen instances — virtually all practically useful machine
learning systems must perform inductive, not merely rote, learning, since a system’s value
lies precisely in its ability to generalize beyond the exact data it was trained on.”
Reinforcement Learning (memorize as a distinct, dedicated definition — the third
named paradigm): “Reinforcement learning is a learning paradigm in which an
autonomous agent learns an optimal behavior policy 𝜋: 𝑆 → 𝐴 (mapping states to actions)
through trial-and-error interaction with an environment, receiving scalar reward signals as
feedback for its actions, with the objective of learning a policy that maximizes the expected
cumulative (discounted) reward over time, rather than learning from a fixed set of labelled
examples as in supervised learning.”
[Draw a diagram here: A classic reinforcement-learning feedback-loop diagram — an
“Agent” box on the left, an “Environment” box on the right. Draw an arrow from
Agent to Environment labelled “Action ( 𝑎
𝑡
).” Draw two arrows from Environment
Topic 2: Types of Data and Matching
Before any machine learning algorithm can be applied, the raw information available about
a problem must be represented in a form the algorithm can process — and the type of that
data fundamentally determines which algorithms, distance measures, and preprocessing
steps are appropriate. Understanding the taxonomy of data types is therefore a
foundational prerequisite examined independently of any specific algorithm, and directly
anticipates the proximity/distance-measure material formally introduced in Unit II
(Nearest-Neighbor-Based Models) of this course.
Data is first classified along the quantitative versus qualitative axis. Quantitative
(numerical) data represents measurable quantities and is further subdivided into
discrete data (countable, taking only specific, separated values, e.g., the number of
children in a family) and continuous data (able to take any value within a range, e.g.,
height or temperature, typically measured to some finite precision). Qualitative
(categorical) data represents attributes or characteristics rather than measured
quantities, and is further subdivided into nominal data (categories with no inherent order,
e.g., blood type, or color) and ordinal data (categories with a meaningful, inherent order or
ranking, but without a well-defined, consistent numerical distance between categories, e.g.,
a satisfaction rating of “poor, fair, good, excellent”).
A closely related and independently examinable classification is Stanley Stevens’ four
scales/levels of measurement , which refine the above taxonomy and directly determine
which mathematical/statistical operations are valid on the data: the nominal scale
(categories only, no order — only equality/inequality comparison is meaningful, e.g., is-
equal-to operations); the ordinal scale (categories with order, so greater-than/less-than
comparisons are meaningful, but subtraction/addition are not meaningfully defined, e.g.,
movie star ratings); the interval scale (numeric, ordered, with equal, meaningful intervals
between values, so addition/subtraction is meaningful, but there is no true, non-arbitrary
zero point, so ratios are not meaningful — the classic example being temperature in Celsius
or Fahrenheit, where 20°C is not “twice as hot” as 10°C); and the ratio scale (numeric,
ordered, equal intervals, AND a true, non-arbitrary zero point representing complete
absence of the quantity, so ratios are meaningful — e.g., height, weight, or income, where a
value of zero genuinely means “none,” and a value of 20 genuinely is twice a value of 10).
This scale hierarchy is cumulative: each higher scale supports all the mathematical
operations of the scales below it, plus additional ones — a frequently tested, precise
ordering.
Beyond these standard numeric/categorical taxonomies, machine learning practice must
also handle structured data (data organized in a well-defined tabular or relational
schema, e.g., a spreadsheet or SQL database table, where each row is an instance and each
column is a well-defined feature/attribute), unstructured data (data with no predefined
schema, such as raw text, images, audio, or video, requiring feature extraction or
representation learning before conventional algorithms can process it), and semi-
structured data (data with some organizational structure but not a rigid, fixed schema,
such as JSON or XML documents, common in web and log data).
Matching , the second concept named in this topic, refers to the general problem of
determining whether, or to what degree, two data instances (patterns) correspond to or
resemble one another — a foundational operation underlying classification (matching a
new instance against known class exemplars), retrieval (matching a query against a
database), and clustering (matching instances against each other to form groups). The
specific mathematical formulation of “matching” depends directly on the data type
involved: for numeric data, matching is typically operationalized via a distance or
similarity measure (e.g., Euclidean distance, formally treated in Unit II); for
categorical/nominal data, matching is typically operationalized via exact-match counting
(e.g., the fraction of attributes on which two instances agree, as in the Simple Matching
Coefficient) or non-metric similarity functions designed specifically for
symbolic/categorical attributes where a numeric distance is not naturally meaningful. The
correct choice of matching function is not arbitrary — it must respect the level of
measurement of the underlying data (per the nominal/ordinal/interval/ratio hierarchy
above), since applying an arithmetic distance measure such as Euclidean distance directly
to nominal categories (e.g., treating “red,” “green,” “blue” as numerically ordered) would
produce a mathematically meaningless and misleading result.
and the four Stevens’ scales of measurement (nominal, ordinal, interval, ratio) with
their cumulative, permitted mathematical operations.
important classification for machine-learning data engineering.
chosen to respect the underlying data’s level of measurement.
[Draw a data-type taxonomy tree diagram here: Root node “Data,” branching into
“Quantitative” and “Qualitative.” Under “Quantitative,” branch further into “Discrete”
and “Continuous.” Under “Qualitative,” branch further into “Nominal” and “Ordinal.”
Beside this tree, draw a second, separate four-level ladder diagram labelled from
bottom to top: “Nominal → Ordinal → Interval → Ratio,” with an arrow going upward
labelled “Increasing mathematical structure / increasing permitted operations,” and
beside each rung, list the newly permitted operation: Nominal = “equality (=),”
Ordinal = “+ ordering (>, <),” Interval = “+ addition/subtraction,” Ratio = “+
multiplication/division (true zero).”]
Quantitative vs. Qualitative data (memorize with examples):
Type Definition Example
Semi-
structured
Some organizational structure, but not a rigid
fixed schema
JSON, XML, log files
Matching — definition (memorize verbatim): “Matching is the operation of determining
whether, or to what degree, two data instances correspond to or resemble one another,
forming the foundational operation underlying classification, retrieval, and clustering; the
specific mathematical formulation of matching — a numeric distance/similarity measure
for quantitative data, or an exact-match/non-metric similarity function for categorical data
— must be chosen to respect the level of measurement of the underlying data.”
Matching function selection table (memorize — links this topic forward to Unit II):
Data Type Appropriate Matching Approach Example Measure
Ratio/Interval
(numeric)
Distance/similarity measures Euclidean distance,
Manhattan distance
Ordinal Rank-based comparison Spearman rank correlation
Nominal/Binary Exact-match counting, non-metric
similarity functions
Simple Matching Coefficient,
Jaccard coefficient
Key pitfall-avoidance sentence (memorize — demonstrates critical understanding
examiners specifically reward): “Applying an arithmetic distance measure such as
Euclidean distance directly to nominal categorical data — for instance, arbitrarily encoding
‘red,’ ‘green,’ ‘blue’ as the numbers 1, 2, 3 and computing numeric distances between them
— is mathematically invalid and produces misleading results, since nominal data supports
only equality comparison, not meaningful subtraction; categorical data instead requires
exact-match-based or non-metric similarity functions specifically designed to respect the
nominal scale.”
Case Study 1 — Netflix’s Mixed-Type Data in Its Recommendation Engine: Netflix’s
recommendation system must simultaneously handle multiple data types within a single
pipeline: ratio-scale data (minutes watched, a true-zero quantity), ordinal data (a user’s 1-
to- 5 - star rating), and nominal data (genre tags, cast members) — the system’s feature-
engineering pipeline applies distinct, type-appropriate matching/similarity functions to
each data type (numeric similarity for viewing duration, rank-aware comparison for star
ratings, and categorical overlap measures for genre/cast matching) before combining them
into a unified similarity score, illustrating why correctly identifying each attribute’s
measurement scale is a practical, not merely theoretical, engineering necessity.
Case Study 2 — Medical Diagnosis Systems Mishandling Ordinal Pain-Scale Data:
Documented critiques of some early clinical machine-learning systems have highlighted
cases where an ordinal patient-reported pain scale (e.g., 1–10) was treated as ratio-scale
data, with algorithms computing means and applying standard arithmetic distance
measures directly to it — since an ordinal pain scale does not guarantee that the “distance”
between a pain rating of 2 and 3 is equal to the distance between 8 and 9, this is a
methodologically questionable practice frequently cited as a cautionary real-world
example of the interval/ratio-versus-ordinal distinction being ignored in practice,
sometimes producing statistically misleading conclusions.
when asked (nominal/ordinal/interval/ratio), most commonly confusing interval
and ratio scales by failing to check for the presence of a true, non-arbitrary zero
point.
data types without recognizing that the correct matching function must be chosen
according to the data’s measurement scale — a common error is proposing
Euclidean distance for nominal/categorical attributes.
structured/unstructured/semi-structured taxonomy, treating them as the same
classification, when they are in fact two independent, orthogonal ways of
characterizing data (one concerning the nature of individual values, the other
concerning overall dataset organization/schema).
Topic 3: Stages in Machine Learning — The ML Pipeline Overview
Machine learning, when applied to a real-world problem, is not a single monolithic
algorithmic step but rather a structured, multi-stage pipeline, in which each stage
transforms the problem representation and produces the necessary input for the next.
Examiners in this unit specifically expect students to be able to name, order, and explain
each of these stages as an integrated whole, since later units of the course (Nearest-
Neighbor Models, Decision Trees, Linear Discriminants, Clustering) each correspond to
specific algorithmic choices made within this overall pipeline — making a correct grasp of
the pipeline itself the conceptual scaffolding on which the rest of the course depends.
The pipeline begins with data acquisition (collecting raw data relevant to the problem
from its source — sensors, databases, web scraping, user interaction logs, or existing
datasets), proceeds through feature engineering (transforming raw data into a set of
informative, discriminative input variables, or “features,” suitable for a learning algorithm
— a stage treated in dedicated depth in Topic 4), and data representation (encoding the
engineered features into a formal mathematical structure, typically a feature vector in a 𝑑-
dimensional space, that a specific learning algorithm can operate on). Only once data has
been acquired, engineered, and formally represented does the pipeline proceed to model
selection (choosing an appropriate class of learning algorithm/model architecture suited
to the problem’s characteristics — e.g., decision trees for interpretable, rule-like problems;
neural networks for high-dimensional perceptual data), model learning (also called model
evaluation performance is unsatisfactory,” to explicitly visualize the non-linear,
iterative nature of the pipeline.]
The seven pipeline stages (memorize as a numbered, defined sequence — the core
essay content for this topic, a near-guaranteed “describe the stages of machine
learning” question):
Stage Function
Engineering
Transforming raw data into informative, discriminative input
variables (“features”)
Representation
Encoding engineered features into a formal mathematical structure
(e.g., a 𝑑-dimensional feature vector)
Choosing an appropriate class of learning algorithm/model
architecture for the problem
optimization procedure minimizing a loss function
Evaluation
Assessing trained-model performance using an appropriate metric,
ideally on held-out data
Prediction
Using the trained, validated model to generate outputs for new,
unseen inputs in deployment
Key sentence on iteration (memorize verbatim — demonstrates the sophisticated,
examinable understanding beyond a bare list): “The machine learning pipeline is
fundamentally iterative rather than strictly linear: unsatisfactory performance observed at
the model-evaluation stage commonly necessitates returning to an earlier stage — revising
feature engineering, acquiring additional data, or selecting a different model class — rather
than proceeding directly to deployment, making the pipeline better understood as a cycle
of refinement than a rigid one-way sequence.”
Data splits across the pipeline (memorize as a table — links directly to Topic 8’s
dataset treatment):
Split
Used During Which
Stage Purpose
Training
set
Model Learning Fit the model’s parameters
Validation
set
Model Selection
(iterative tuning)
Compare candidate models/hyperparameters
without contaminating the final performance
estimate
Test set Model Evaluation
(final, single use)
Provide an unbiased estimate of real-world
generalization performance
Formula — general learning objective (write and explain, connects the pipeline to
the optimization performed at the Model Learning stage):
= argmin
𝜃
𝑛
𝑖= 1
𝑖
𝜃
𝑖
Where 𝜃 represents the model’s parameters, 𝐿 is a loss function measuring the discrepancy
between the true label 𝑦 𝑖
and the model’s prediction 𝑓
𝜃
𝑖
, 𝑛 is the number of training
instances, and 𝜆𝑅
is an optional regularization term penalizing model complexity to
reduce overfitting. Model Learning is precisely the process of finding the parameter values
that minimize this objective.
Case Study 1 — Google’s Ad Click-Through-Rate (CTR) Prediction Pipeline: Google’s
advertising systems implement the full ML pipeline at massive scale: data acquisition
continuously ingests billions of user-interaction events; feature engineering constructs
features such as user-query similarity and historical click patterns; model selection has
evolved over time from logistic regression to deep neural architectures; model learning is
performed via distributed, large-scale gradient-based optimization; model evaluation uses
held-out click data measured via metrics such as log-loss and AUC; and model prediction
serves real-time ad-ranking decisions — with continuous, iterative feedback from live
performance data flowing back into feature engineering and model retraining, a concrete,
industrial-scale illustration of the pipeline’s iterative nature.
Case Study 2 — IBM Watson’s Early Deployment Iteration in Oncology: IBM’s Watson
for Oncology system, when deployed in clinical trial settings, reportedly required
substantial iterative revision after initial model-evaluation results revealed the system
recommending treatments inconsistent with clinical best practice in certain cases —
necessitating a return to earlier pipeline stages (revising training data curation/feature
engineering with additional oncologist input) rather than a one-time, linear deployment,
illustrating in a high-stakes real-world domain why the iterative feedback loop between
evaluation and earlier pipeline stages is not merely a theoretical nicety but an operational
necessity.
omitting “data representation” as a distinct stage from “feature engineering,” or
conflating “model learning” and “model evaluation” as a single step, when examiners
expect all seven stages named distinctly and in the correct sequence.
the iterative feedback loop from evaluation back to earlier stages — a purely linear
description misses a specifically and frequently tested characteristic of the pipeline.
by using the test set repeatedly during iterative model tuning (a methodological
error that contaminates the unbiased final performance estimate the test set is
specifically intended to provide).
and learning increasingly difficult as irrelevant dimensions are added) and by the practical
benefits of reduced computational cost and improved model interpretability. Feature
transformation/scaling normalizes or rescales feature values (e.g., standardization to
zero mean and unit variance, or min-max normalization to a fixed
range) to ensure
that features measured on different numeric scales contribute proportionally and fairly to
algorithms — particularly distance-based algorithms (directly connecting to Topic 2’s
matching discussion and Unit II’s nearest-neighbor material), where a feature with a
naturally larger numeric range would otherwise dominate the distance computation
regardless of its true relative importance. Feature encoding converts categorical/nominal
features (per Topic 2’s data-type taxonomy) into a numeric representation a mathematical
learning algorithm can process, commonly via one-hot encoding (representing each
category as a binary indicator vector, avoiding the false implication of ordinal relationship
that a naive integer encoding of nominal categories would introduce, directly connecting to
Topic 2’s warning against applying arithmetic operations to nominal data).
data, and the “garbage in, garbage out” principle governing downstream model
quality.
versus choosing a relevant subset of existing features, motivated by the curse of
dimensionality.
ranges (standardization, min-max scaling) and correctly encoding categorical
features (one-hot encoding) to respect the data’s measurement scale.
[Draw a diagram here: On the left, a raw, messy icon representing “Raw Data” (e.g., a
jumbled pile of numbers, text snippets, and images). An arrow points right into a box
labelled “Feature Engineering,” subdivided into four small internal labelled steps:
“Extraction,” “Selection,” “Scaling/Transformation,” “Encoding.” An arrow points
right out of this box to a clean, organized icon representing “Feature Vector 𝑥 ∈ ℝ
𝑑
— a neat column of numbers — ready for input to a learning algorithm.]
Data acquisition sources (memorize as a comparison table):
Source
Type
Description Trade-off
Primary
data
Collected directly/specifically
for the task (sensors, surveys,
experiments)
High relevance, but higher cost/lower
volume
Secondary
data
Repurposed existing data
(logs, transactional records,
public datasets)
Low cost/high volume, but potential
relevance/bias issues
Source
Type Description Trade-off
Synthetic
data
Artificially generated
according to a
model/simulation
Useful when real data is
scarce/costly/privacy-constrained, but
may not capture real-world
complexity/noise faithfully
Sampling bias — key sentence (memorize verbatim): “If acquired data is not
representative of the true underlying population against which a model will be deployed,
the resulting model will systematically underperform or produce biased predictions on the
underrepresented portion of the population, regardless of the sophistication of the
subsequent learning algorithm — a principle summarized as ‘garbage in, garbage out.’”
Feature extraction vs. feature selection (memorize this precise distinction — a
frequently and precisely tested pair of terms):
Aspect Feature Extraction Feature Selection
Operation Transforms/combines raw
variables into NEW features
Chooses a relevant SUBSET of
existing features
Output
dimensionality
Typically a new, often lower-
dimensional representation
A subset of the original feature
set (no new features created)
Example
Computing edge descriptors from
raw pixel values
Discarding a redundant or
irrelevant column from a
dataset
The curse of dimensionality (memorize the definition and its consequence — a very
frequently tested concept): “The curse of dimensionality refers to the phenomenon in
which the volume of a feature space grows exponentially as the number of dimensions
(features) increases, causing available training data to become increasingly sparse relative
to that volume; as a consequence, distance-based and density-based learning methods
become progressively less effective and more data-hungry as irrelevant or redundant
dimensions are added, motivating feature selection and dimensionality reduction as
necessary countermeasures.”
Feature scaling formulas (memorize both, and know when each applies):
Standardization (Z-score normalization) — rescales to zero mean, unit variance:
where 𝜇 is the feature’s mean and 𝜎 is its standard deviation across the training data.
Min-Max normalization — rescales to a fixed [ 0 , 1 ] range:
𝑚𝑖𝑛
𝑚𝑎𝑥
𝑚𝑖𝑛
for distance-based methods, missing the direct causal link between unscaled
features and a distance computation being dominated by whichever feature
happens to have the largest numeric range.
(e.g., red=1, green=2, blue=3) without recognizing this improperly imposes a false
ordinal relationship on nominal data, rather than correctly applying one-hot
encoding — a direct, frequently tested application of Topic 2’s nominal-data-
handling principle.
Topic 5: Data Representation and Model Selection
Data representation is the pipeline stage in which engineered features are formally
encoded into the specific mathematical structure that a chosen learning algorithm requires
as input. The most common and foundational representation in classical machine learning
is the feature vector : each instance (data point) 𝑥
𝑖
is represented as a 𝑑-dimensional
vector 𝑥
𝑖
𝑖 1
𝑖 2
𝑖𝑑
𝑑
, where each component corresponds to the value of one
engineered feature, and the complete dataset is conceptually organized as an 𝑛 × 𝑑 matrix
(the “design matrix”), with 𝑛 rows corresponding to instances and 𝑑 columns
corresponding to features. This feature-vector representation directly enables the
geometric interpretation of machine learning that underlies most classical algorithms: each
instance becomes a point in a 𝑑-dimensional feature space, classification becomes the
problem of partitioning that space into class-specific regions, and clustering becomes the
problem of identifying dense groupings of points within it — a geometric intuition that
recurs throughout the nearest-neighbor, decision-tree, and linear-discriminant material of
later units.
Beyond the standard flat feature-vector representation, data representation must
sometimes accommodate more specialized structures depending on the nature of the
underlying data: sequential/temporal representations (data with an inherent ordering,
such as time-series or natural-language text, where the sequence order itself carries
information not captured by an unordered feature vector); graph/relational
representations (data with explicit relationships between instances, such as social
networks or molecular structures, requiring representations that capture node
connectivity, not merely isolated instance attributes); and matrix/tensor
representations (data with inherent multi-dimensional structure, such as images,
naturally represented as a 2D or 3D array of pixel intensities rather than a flattened vector,
in order to preserve spatial relationships between adjacent pixels). The choice of
representation is not a neutral, mechanical step — it fundamentally determines what
structural information is available to, or hidden from, the subsequent learning algorithm,
making data representation a decision with direct, first-order consequences for achievable
model performance.
Model selection , the pipeline stage that follows data representation, is the process of
choosing an appropriate class or family of learning algorithms/model architectures suited
to the specific characteristics of the problem, data representation, and performance
requirements at hand. Model selection operates at (at least) two distinct levels, both
individually examinable: algorithm-class selection (choosing among fundamentally
different families of models — e.g., a nearest-neighbor method, a decision tree, a linear
discriminant, or a neural network — each embodying different assumptions about the
structure of the underlying data and target function) and hyperparameter selection
(once a model class is chosen, selecting the specific configuration values — e.g., the number
of neighbors 𝑘 in a k-NN classifier, or the maximum depth of a decision tree — that are not
learned directly from data during model-learning but must instead be set prior to or
alongside training, typically via the validation-set-based tuning procedure discussed in
Topic 3).
A central theoretical principle governing model selection is the bias–variance trade-off
(elaborated further with specific mathematical treatment in Unit III’s coverage of decision
trees, but conceptually foundational here): models with high representational capacity
(e.g., deep decision trees, high-degree polynomial regression) tend to have low bias (able to
fit complex, intricate patterns in the training data closely) but high variance (highly
sensitive to the specific training sample, prone to fitting noise rather than true underlying
structure, i.e., overfitting ), while models with low representational capacity (e.g., a linear
model) tend to have high bias (unable to capture complex true patterns, i.e., underfitting )
but low variance (relatively stable/insensitive to the specific training sample). No single
model class is universally superior across all problems — a principle formalized by the “No
Free Lunch” theorem (Wolpert and Macready), which states that, averaged across all
possible problems, no single learning algorithm outperforms any other; a given algorithm’s
superiority is always specific to the structural assumptions of the particular problem class
it is applied to — making informed model selection, rather than blind reliance on a single
“best” algorithm, a genuinely necessary and non-trivial step in the pipeline.
ML (instances as points in 𝑑-dimensional space), alongside specialized
representations (sequential, graph, matrix/tensor) for structured data types.
fundamentally different model families) and hyperparameter selection (configuring
the chosen model class).
justification for why model selection must be problem-specific rather than relying
on a single universally best algorithm.
[Draw a diagram here: A simple 2D scatter-plot-style diagram showing several data
points plotted in a plane, each point labelled with its coordinate values, e.g., “ 𝑥 1
.” Label the two axes “Feature 1” and “Feature 2” to visually demonstrate the