Back to courses
Cognitive Science beginner

Pattern recognition: a primer

Duration0 hours
Modules7
ForGeneral public, lifelong learners
Video1-2min
Get started — free →

Course outline

Module 1 Module 1: What Is Pattern Recognition?

What Is Pattern Recognition?

Introduction

Core content I

Core content II

Core content III

Summary

Further learning

Knowledge check

Q1. What is the best description of pattern recognition?
  • A. Storing large amounts of data without organizing it
  • B. Identifying regularities, structures, or repeated relationships in data ✓
  • C. Encrypting information so that it cannot be read by others
  • D. Randomly guessing outcomes based on past events

Why: Pattern recognition is the process of detecting regularities, structures, or recurring relationships within data, which allows us to classify, predict, or make sense of new inputs.

Q2. Which of the following is an everyday example of pattern recognition?
  • A. Calculating the square root of a number
  • B. Recognizing a friend's face in a crowd ✓
  • C. Writing a computer program from scratch
  • D. Measuring the temperature of a room

Why: Recognizing a friend's face involves matching visual features against stored patterns learned from experience, which is a classic example of pattern recognition.

Q3. In machine learning, what is a 'feature' in the context of pattern recognition?
  • A. A bug in the algorithm that causes errors
  • B. An individual measurable property of the data used for analysis ✓
  • C. The final output produced by a model
  • D. The hardware used to run the computations

Why: A feature is an individual measurable property or characteristic of the data, such as the height of a person or the brightness of a pixel, that a model uses to identify patterns.

Q4. What is the difference between supervised and unsupervised pattern recognition?
  • A. Supervised learning uses labeled examples, while unsupervised learning finds structure in unlabeled data ✓
  • B. Supervised learning requires no data, while unsupervised learning requires large datasets
  • C. Supervised learning is only used for images, while unsupervised learning is only used for text
  • D. There is no difference; the terms are interchangeable

Why: Supervised learning trains on examples paired with correct labels, whereas unsupervised learning discovers patterns or groupings in data without any provided labels.

Q5. Why is pattern recognition important for handling new, unseen data?
  • A. It allows systems to generalize what they learned from past examples to new situations ✓
  • B. It ensures that new data is always identical to old data
  • C. It eliminates the need for any data collection
  • D. It guarantees perfect accuracy on every input

Why: Good pattern recognition captures underlying regularities rather than memorizing specific examples, so it can apply what was learned to new inputs it has never encountered before.

Module 2 Module 2: Human Perception and Visual Patterns

Human Perception and Visual Patterns

Introduction

Core content I

Core content II

Core content III

Summary

Further learning

Knowledge check

Q1. Which principle of Gestalt psychology explains why we tend to perceive elements that are close together as belonging to the same group?
  • A. Similarity
  • B. Proximity ✓
  • C. Closure
  • D. Continuity

Why: The Gestalt principle of proximity states that objects positioned near each other are perceived as a single group, even when other features differ.

Q2. When you see a face in an electrical outlet or a cloud, which perceptual tendency is at work?
  • A. Pareidolia ✓
  • B. Habituation
  • C. Binocular rivalry
  • D. Figure-ground reversal

Why: Pareidolia is the tendency to perceive meaningful patterns, especially faces, in random or ambiguous visual stimuli.

Q3. The brain fills in the missing edges of an incomplete circle so it appears whole. What is this perceptual phenomenon called?
  • A. Closure ✓
  • B. Similarity
  • C. Common fate
  • D. Symmetry

Why: Closure is the Gestalt principle by which the mind completes incomplete shapes, perceiving them as whole figures.

Q4. In the famous vase-or-faces image, the viewer's perception alternates between two interpretations. What term describes this distinction between the focal shape and its background?
  • A. Figure-ground relationship ✓
  • B. Visual acuity
  • C. Contrast adaptation
  • D. Saccadic masking

Why: Figure-ground perception describes how the visual system separates a shape (figure) from its surroundings (ground), which in ambiguous images can flip.

Q5. Why do people tend to notice their own name in a crowded room full of background chatter?
  • A. Their name is always spoken louder than other words
  • B. Familiar and personally significant stimuli capture attention more readily ✓
  • C. The brain stops processing all sounds except speech
  • D. Names activate the visual cortex directly

Why: Personally meaningful stimuli, such as one's own name, receive preferential attentional processing, which is why they can break through a noisy environment.

Module 3 Module 3: Statistical Foundations for Patterns

Statistical Foundations for Patterns

Introduction

Core content I

Core content II

Core content III

Summary

Further learning

Knowledge check

Q1. Which measure of central tendency is most affected by extreme outliers in a dataset?
  • A. Median
  • B. Mode
  • C. Mean ✓
  • D. Range

Why: The mean is calculated by summing all values, so a single extreme value pulls the average toward it. The median and mode depend on position or frequency rather than magnitude, so they are far more resistant to outliers.

Q2. What does a standard deviation of 0 indicate about a dataset?
  • A. The dataset contains only negative values
  • B. The dataset has no spread because all values are identical ✓
  • C. The mean is equal to the median
  • D. The dataset contains no outliers

Why: Standard deviation measures how far values spread from the mean. A value of 0 means every observation equals the mean, so there is no variation at all. The other options do not follow from this fact.

Q3. In pattern recognition, what is the primary purpose of splitting data into training and test sets?
  • A. To make the dataset smaller and faster to process
  • B. To evaluate how well a model generalizes to data it has not seen ✓
  • C. To ensure the training data has more outliers
  • D. To guarantee the model will achieve 100% accuracy

Why: A model evaluated only on the data it was trained on can simply memorize it. A held-out test set estimates performance on new data, which is the real goal of pattern recognition.

Q4. A dataset has a mean of 50 and a standard deviation of 5. Approximately what percentage of values fall between 40 and 60 if the data is normally distributed?
  • A. 68%
  • B. 95% ✓
  • C. 99.7%
  • D. 50%

Why: Values 40 and 60 are exactly two standard deviations below and above the mean (50 minus 10 and 50 plus 10). Under a normal distribution, about 95% of values lie within two standard deviations of the mean.

Q5. Which statement best describes overfitting in pattern recognition?
  • A. A model performs poorly on both training and test data
  • B. A model learns noise and specific details of the training data, hurting performance on new data ✓
  • C. A model uses too few features to capture the underlying pattern
  • D. A model trains faster than expected because the dataset is small

Why: Overfitting occurs when a model captures random noise in the training data as if it were a real pattern. It performs well on training data but poorly on unseen data. Using too few features describes underfitting, not overfitting.

Module 4 Module 4: Feature Extraction and Representation

Feature Extraction and Representation

Introduction

Core content I

Core content II

Core content III

Summary

Further learning

Knowledge check

Q1. What is the main purpose of feature extraction in pattern recognition?
  • A. To collect as much raw data as possible before training a model
  • B. To transform raw input into informative, compact representations that highlight relevant characteristics ✓
  • C. To remove all noise from the dataset by deleting samples
  • D. To assign class labels to each input example

Why: Feature extraction converts raw data (such as pixels or audio samples) into representations that capture the properties useful for distinguishing patterns, while reducing redundancy and dimensionality.

Q2. Which of the following is an example of a hand-crafted feature for images?
  • A. The output probability of a neural network's final layer
  • B. Edge orientation histograms computed from image gradients ✓
  • C. The randomly initialized weights of a classifier
  • D. The total number of images in the dataset

Why: Edge orientation histograms (as used in HOG descriptors) are classic hand-crafted features designed by engineers, computed directly from pixel gradients, unlike learned or model-internal quantities.

Q3. What does it mean for a feature to be 'invariant' in pattern recognition?
  • A. The feature never changes its numerical value for any input
  • B. The feature stays the same under certain transformations, such as translation or rotation ✓
  • C. The feature requires no normalization before use
  • D. The feature is calculated identically across all classifiers

Why: Invariance means a representation remains unchanged when the input undergoes specific transformations, such as shifting or rotating an object, so recognition does not depend on those variations.

Q4. Why is feature normalization, such as scaling values to a common range, often applied before classification?
  • A. It increases the number of features in the dataset
  • B. It prevents features with larger numeric ranges from dominating distance-based or gradient-based computations ✓
  • C. It guarantees that the classifier will achieve 100% accuracy
  • D. It converts all features into categorical labels

Why: Features measured on different scales can bias algorithms that rely on distances or gradients. Normalization puts features on comparable scales so each contributes fairly.

Q5. What is the primary goal of dimensionality reduction in feature representation?
  • A. To increase the number of features so the model sees more detail
  • B. To remove redundant or less informative dimensions while preserving important structure ✓
  • C. To convert numerical data into text strings
  • D. To ensure every data point has exactly the same label

Why: Dimensionality reduction, such as PCA, compresses data into fewer dimensions while keeping the variation most useful for recognition, which lowers computational cost and can reduce overfitting.

Module 5 Module 5: Classification and Decision Boundaries

Classification and Decision Boundaries

Introduction

Core content I

Core content II

Core content III

Summary

Further learning

Knowledge check

Q1. In a binary classification problem, what is a decision boundary?
  • A. The maximum number of training examples a model can handle
  • B. The surface in feature space that separates regions assigned to different classes ✓
  • C. The minimum accuracy a classifier must achieve to be useful
  • D. The learning rate used during gradient descent

Why: A decision boundary is the set of points in feature space where the classifier is indifferent between classes; it partitions the space into regions, each associated with one predicted class.

Q2. Which of the following best describes a linear decision boundary?
  • A. A curve that wraps around clusters of data points
  • B. A straight line in two dimensions or a hyperplane in higher dimensions ✓
  • C. A boundary that changes its shape for every new data point
  • D. A boundary defined only by the mean of each class

Why: A linear decision boundary is a straight line (2D) or hyperplane (higher dimensions) given by an equation of the form w·x + b = 0, which separates the feature space into two half-spaces.

Q3. A logistic regression classifier predicts class 1 when the predicted probability is at least 0.5. Where does its decision boundary lie?
  • A. Where the predicted probability equals 0.5 ✓
  • B. Where the predicted probability equals 1
  • C. Where the feature values are all zero
  • D. Where the training loss is minimized

Why: The decision boundary is the set of points where the predicted probability equals the threshold, here 0.5. For logistic regression, this corresponds to w·x + b = 0, a linear boundary.

Q4. What typically happens when a classifier's decision boundary is too complex for the amount of training data available?
  • A. The model underfits and performs poorly on training data
  • B. The model overfits, fitting noise and generalizing poorly to new data ✓
  • C. The decision boundary becomes a straight line automatically
  • D. The number of classes is reduced to two

Why: An overly complex boundary can wrap around individual training points, including noise, leading to overfitting: strong training performance but weak performance on unseen data.

Q5. Consider two classes that form concentric rings in a 2D plane, with one class inside the other. Which kind of decision boundary is needed to separate them well?
  • A. A single straight line
  • B. A nonlinear boundary, such as a circle ✓
  • C. A boundary parallel to the x-axis only
  • D. No boundary is needed because the classes overlap

Why: Concentric classes cannot be separated by any straight line. A nonlinear boundary such as a circle (or a nonlinear model or kernel transformation) is required to separate the inner and outer rings.

Module 6 Module 6: Clustering and Unsupervised Discovery

Clustering and Unsupervised Discovery

Introduction

Core content I

Core content II

Core content III

Summary

Further learning

Knowledge check

Q1. What is the main goal of clustering in unsupervised learning?
  • A. To predict a labeled target variable from input features
  • B. To group similar data points together without using labels ✓
  • C. To reduce the dimensionality of labeled training data
  • D. To measure the accuracy of a trained classifier

Why: Clustering seeks to discover natural groupings in data based on similarity, without any predefined labels guiding the process.

Q2. Which of the following best describes the k-means algorithm?
  • A. It builds a tree by recursively splitting data on feature thresholds
  • B. It assigns each point to the nearest of k centroids and iteratively updates the centroids ✓
  • C. It estimates the probability density of data using a mixture of Gaussians
  • D. It connects points into a graph and removes the longest edges

Why: K-means alternates between assigning points to their nearest centroid and recomputing each centroid as the mean of its assigned points, until assignments stabilize.

Q3. In k-means clustering, what must the analyst specify before running the algorithm?
  • A. The true class labels of each data point
  • B. The number of clusters k ✓
  • C. The learning rate for gradient descent
  • D. The number of hidden layers in the network

Why: K-means requires the number of clusters k as an input parameter; the algorithm does not determine it automatically.

Q4. What does the elbow method help you determine in clustering?
  • A. The best distance metric to use
  • B. A reasonable number of clusters k ✓
  • C. Which features are most correlated
  • D. Whether the data contains missing values

Why: The elbow method plots within-cluster sum of squares against k and looks for the point where adding more clusters yields diminishing improvement.

Q5. Which statement about hierarchical clustering is true?
  • A. It always requires the number of clusters to be specified in advance
  • B. It produces a tree-like structure (dendrogram) showing nested groupings at multiple levels ✓
  • C. It can only be applied to numerical data with fewer than ten features
  • D. It assigns each point to exactly one centroid that is never updated

Why: Hierarchical clustering builds a dendrogram representing how clusters merge or split across levels, and the number of clusters can be chosen afterward by cutting the tree.

Module 7 Module 7: Evaluating Pattern Recognition Systems

Evaluating Pattern Recognition Systems

Introduction

Core content I

Core content II

Core content III

Summary

Further learning

Knowledge check

Q1. Which metric measures the proportion of all actual positive cases that a pattern recognition system correctly identifies?
  • A. Precision
  • B. Recall ✓
  • C. Specificity
  • D. Accuracy

Why: Recall (also called sensitivity or true positive rate) is the fraction of actual positives correctly identified: TP / (TP + FN). Precision instead measures how many predicted positives are truly positive.

Q2. A spam filter flags 80 emails as spam. Of those, 60 are actually spam. What is the precision of the filter?
  • A. 0.60
  • B. 0.75 ✓
  • C. 0.80
  • D. 0.20

Why: Precision = true positives / all predicted positives = 60 / 80 = 0.75.

Q3. Why is accuracy a misleading metric on a dataset where 95% of samples belong to one class?
  • A. Accuracy cannot be calculated for imbalanced data.
  • B. A model that always predicts the majority class achieves 95% accuracy without learning any useful pattern. ✓
  • C. Accuracy always decreases as the number of classes increases.
  • D. Accuracy only applies to regression problems.

Why: With a 95% majority class, a trivial classifier that always predicts that class scores 95% accuracy while failing to detect the minority class at all. Metrics such as precision, recall, or F1 give a clearer picture.

Q4. What does a k-fold cross-validation procedure primarily help estimate?
  • A. The exact number of parameters in the model
  • B. How well the model is likely to generalize to unseen data ✓
  • C. The training time of the algorithm
  • D. The size of the original dataset

Why: Cross-validation splits data into k parts, training on k-1 and testing on the remaining part in rotation. Averaging the results gives a more reliable estimate of generalization performance than a single train-test split.

Q5. Which situation best describes overfitting in a pattern recognition system?
  • A. The model performs poorly on both training and test data.
  • B. The model performs well on training data but significantly worse on new, unseen data. ✓
  • C. The model takes too long to train on a standard computer.
  • D. The model uses too few input features to make any predictions.

Why: Overfitting occurs when a model learns noise and specific details of the training set, so its training performance is high while its performance on unseen data drops noticeably.

Stay in the loop on this course.

We’ll email you when new modules or related material drops. No spam.

Built with Fragment Language. Sovereign architecture — no third-party trackers.
FragRun.mfgAFImemoryFGOwnership: B-Systems.ee