Back to courses
Digital Skills beginner

Understanding Machine Learning Models

Duration0 hours
Modules7
Get started — free →

Course outline

Module 1 Module 1: Introduction to Machine Learning

Introduction to Machine Learning

Introduction

Core content I

Core content II

Core content III

Summary

Further learning

Knowledge check

Q1. What is the main goal of machine learning?
  • A. To write exact step-by-step instructions for every possible input
  • B. To let computers learn patterns from data and make predictions or decisions without being explicitly programmed for each case ✓
  • C. To store large amounts of data in databases
  • D. To replace all human decision-making with fixed rules

Why: Machine learning focuses on algorithms that improve their performance by learning patterns from data, rather than relying on hand-coded rules for every situation.

Q2. Which type of machine learning uses labeled data to train a model?
  • A. Unsupervised learning
  • B. Reinforcement learning
  • C. Supervised learning ✓
  • D. Clustering

Why: Supervised learning trains models on input-output pairs where the correct answers (labels) are provided, allowing the model to learn the mapping between them.

Q3. Which of the following is an example of a regression problem?
  • A. Classifying emails as spam or not spam
  • B. Grouping customers into segments based on purchasing behavior
  • C. Predicting the price of a house based on its size and location ✓
  • D. Identifying the species of a flower from a photo

Why: Regression predicts a continuous numerical value, such as a house price. Spam detection and species identification are classification tasks, and customer grouping is clustering.

Q4. What is the purpose of a training dataset in machine learning?
  • A. To evaluate the final performance of the model on unseen data
  • B. To store the model's predictions after deployment
  • C. To teach the model by letting it find patterns in the data ✓
  • D. To define the programming language used for the model

Why: The training dataset is used to fit the model's parameters so it can learn patterns. A separate test dataset is typically used later to evaluate how well it generalizes.

Q5. Why is a separate test dataset important?
  • A. It makes the model train faster
  • B. It provides an unbiased estimate of how well the model performs on data it has never seen ✓
  • C. It replaces the need for a training dataset
  • D. It increases the size of the original dataset automatically

Why: Evaluating on data the model was not trained on reveals whether it has truly learned generalizable patterns or has simply memorized the training examples, a problem known as overfitting.

Module 2 Module 2: Data Preparation and Feature Engineering

Data Preparation and Feature Engineering

Introduction

Core content I

Core content II

Core content III

Summary

Further learning

Knowledge check

Q1. Which of the following best describes the purpose of data preparation in a machine learning workflow?
  • A. To deploy the model to production servers
  • B. To clean and transform raw data into a format suitable for training a model ✓
  • C. To select the final evaluation metric for the model
  • D. To tune the hyperparameters of the learning algorithm

Why: Data preparation involves cleaning, transforming, and organizing raw data so that a machine learning model can learn from it effectively. Deployment, metric selection, and hyperparameter tuning happen at other stages of the workflow.

Q2. What is a common technique for handling missing values in a dataset?
  • A. Removing all columns that contain any data
  • B. Doubling every numeric value in the dataset
  • C. Imputing missing values with the mean or median of the column ✓
  • D. Replacing all missing values with the word 'unknown' in numeric columns

Why: Imputation with the mean or median is a widely used, simple strategy for filling in missing numeric values while preserving the rows in the dataset. Replacing text labels in numeric columns would break the data type, and dropping all columns would discard most of the information.

Q3. What is feature scaling, and why is it useful?
  • A. Adding more features to increase model complexity
  • B. Converting categorical features into numerical codes only
  • C. Adjusting numeric features to a common range so that features with large values do not dominate the learning process ✓
  • D. Removing features that have a low correlation with the target

Why: Feature scaling, such as min-max normalization or standardization, brings numeric features onto comparable scales. This helps distance-based and gradient-based algorithms train more stably and fairly across features.

Q4. What does one-hot encoding do?
  • A. It converts a categorical variable into a set of binary columns, one for each category ✓
  • B. It compresses all numeric features into a single value
  • C. It randomly assigns integers to each row of the dataset
  • D. It removes duplicate rows from the dataset

Why: One-hot encoding creates a new binary column for each category of a categorical variable, marking 1 for the category present in a row and 0 otherwise. This lets models process categorical data without implying a false numerical order among categories.

Q5. Why is it important to split data into training and test sets?
  • A. To make the dataset smaller so training runs faster
  • B. To evaluate how well the model generalizes to data it has not seen during training ✓
  • C. To ensure that the model memorizes every training example
  • D. To remove outliers from the dataset automatically

Why: A held-out test set provides an estimate of how the model will perform on new, unseen data. Evaluating only on training data can give overly optimistic results because the model may have memorized patterns that do not generalize.

Module 3 Module 3: Supervised Learning Fundamentals

Supervised Learning Fundamentals

Introduction

Core content I

Core content II

Core content III

Summary

Further learning

Knowledge check

Q1. What is the defining characteristic of supervised learning?
  • A. The model learns from unlabeled data without any guidance
  • B. The model learns from labeled examples where the correct output is provided for each input ✓
  • C. The model learns by interacting with an environment and receiving rewards
  • D. The model groups similar data points together without predefined categories

Why: Supervised learning uses labeled training data, meaning each input example is paired with its correct output, allowing the model to learn the mapping between inputs and outputs.

Q2. Which of the following is an example of a classification task?
  • A. Predicting the price of a house based on its square footage
  • B. Predicting tomorrow's temperature in degrees Celsius
  • C. Determining whether an email is spam or not spam ✓
  • D. Estimating the number of hours a student will study next week

Why: Classification predicts a discrete category or class label. Deciding whether an email is spam or not spam assigns it to one of two categories, whereas the other options predict continuous numerical values, which is regression.

Q3. What is the purpose of splitting data into training and testing sets?
  • A. To make the dataset smaller so training runs faster
  • B. To evaluate how well the model generalizes to data it has not seen before ✓
  • C. To ensure that the model memorizes every example in the dataset
  • D. To remove missing values from the data

Why: The test set is held back during training so it can measure performance on unseen data. This shows whether the model generalizes beyond the examples it learned from, rather than simply memorizing the training data.

Q4. What does it mean if a model is overfitting?
  • A. The model performs poorly on both training and test data
  • B. The model performs well on training data but poorly on new, unseen data ✓
  • C. The model has too few parameters to capture patterns in the data
  • D. The model trains too quickly and stops before converging

Why: Overfitting occurs when a model learns the noise and specific details of the training data so closely that it fails to generalize. It shows high training accuracy but low accuracy on new data.

Q5. In a regression task, what type of output does the model produce?
  • A. A probability distribution over a fixed set of classes
  • B. A cluster assignment for each data point
  • C. A continuous numerical value ✓
  • D. A ranking of items from most to least relevant

Why: Regression models predict continuous numerical values, such as prices, temperatures, or distances. Probability distributions over classes are associated with classification, and cluster assignments belong to unsupervised learning.

Module 4 Module 4: Unsupervised Learning Techniques

Unsupervised Learning Techniques

Introduction

Core content I

Core content II

Core content III

Summary

Further learning

Knowledge check

Q1. What is the main goal of unsupervised learning?
  • A. To predict a labeled target variable from input features
  • B. To discover hidden patterns or structure in unlabeled data ✓
  • C. To maximize a reward signal through trial and error
  • D. To classify new examples using previously labeled data

Why: Unsupervised learning works with unlabeled data and aims to uncover hidden patterns, groupings, or structure without predefined target outputs.

Q2. Which of the following is an example of a clustering algorithm?
  • A. Linear regression
  • B. Decision tree
  • C. K-means ✓
  • D. Logistic regression

Why: K-means is a classic clustering algorithm that partitions data into k groups based on similarity. The other options are supervised learning methods.

Q3. What does Principal Component Analysis (PCA) primarily do?
  • A. It assigns labels to unlabeled data points
  • B. It reduces the dimensionality of data while preserving as much variance as possible ✓
  • C. It increases the number of features to improve accuracy
  • D. It splits data into training and test sets

Why: PCA is a dimensionality reduction technique that projects data onto a smaller set of orthogonal components that capture the greatest variance in the data.

Q4. In K-means clustering, what does the parameter K represent?
  • A. The number of iterations the algorithm runs
  • B. The number of features in the dataset
  • C. The number of clusters to form ✓
  • D. The learning rate used for updates

Why: K is the number of clusters the algorithm will partition the data into. It must be chosen in advance, often using methods like the elbow method.

Q5. Which use case is best suited for unsupervised learning?
  • A. Predicting house prices from known sale records
  • B. Grouping customers into segments based on purchasing behavior with no predefined segments ✓
  • C. Detecting whether an email is spam using labeled examples
  • D. Forecasting tomorrow's temperature from historical labeled data

Why: Customer segmentation without predefined categories is a classic unsupervised task, since there are no labels telling the model which segment each customer belongs to.

Module 5 Module 5: Model Evaluation and Validation

Model Evaluation and Validation

Introduction

Core content I

Core content II

Core content III

Summary

Further learning

Knowledge check

Q1. What is the main purpose of a validation set in machine learning?
  • A. To train the model's parameters directly
  • B. To tune hyperparameters and compare model configurations before final testing ✓
  • C. To replace the training set entirely
  • D. To measure the final performance reported to stakeholders

Why: The validation set is used to tune hyperparameters and select among model configurations. The test set is reserved for an unbiased final evaluation, and the training set is used to fit the model's parameters.

Q2. Which metric is most appropriate for evaluating a binary classifier when the classes are highly imbalanced?
  • A. Accuracy
  • B. Mean squared error
  • C. F1-score ✓
  • D. R-squared

Why: With imbalanced classes, a model can achieve high accuracy by always predicting the majority class. The F1-score balances precision and recall, giving a more informative picture of performance on the minority class. Mean squared error and R-squared are regression metrics.

Q3. What does k-fold cross-validation do?
  • A. It splits the data into k classes based on labels
  • B. It trains the model k times on different subsets, each time holding out one fold for validation ✓
  • C. It removes the k most outlying data points
  • D. It trains k separate models and always keeps the one with the lowest training error

Why: In k-fold cross-validation, the data is divided into k folds. The model is trained on k-1 folds and validated on the remaining fold, rotating so every fold serves as the validation set once. The results are averaged for a more reliable performance estimate.

Q4. A model has high accuracy on training data but much lower accuracy on unseen test data. What is this most likely a sign of?
  • A. Underfitting
  • B. Overfitting ✓
  • C. Data leakage into the test set
  • D. Perfect generalization

Why: A large gap between training and test performance indicates overfitting, where the model has memorized patterns specific to the training data rather than learning generalizable relationships.

Q5. In a confusion matrix for a binary classifier, what does a false positive represent?
  • A. The model predicted the positive class, and the actual label was positive
  • B. The model predicted the negative class, and the actual label was positive
  • C. The model predicted the positive class, but the actual label was negative ✓
  • D. The model predicted the negative class, and the actual label was negative

Why: A false positive occurs when the model predicts the positive class but the true label is negative. A false negative is the opposite case, where the model predicts negative for an actual positive.

Module 6 Module 6: Neural Networks and Deep Learning Basics

Neural Networks and Deep Learning Basics

Introduction

Core content I

Core content II

Core content III

Summary

Further learning

Knowledge check

Q1. What is the basic building block of a neural network?
  • A. A decision tree
  • B. A neuron (node) that computes a weighted sum of its inputs and applies an activation function ✓
  • C. A support vector
  • D. A cluster centroid

Why: A neural network is built from artificial neurons, each of which computes a weighted sum of its inputs, adds a bias, and passes the result through an activation function to produce its output.

Q2. Which of the following is the purpose of an activation function such as ReLU or sigmoid?
  • A. To store the training data in memory
  • B. To split the dataset into training and test sets
  • C. To introduce non-linearity so the network can learn complex patterns ✓
  • D. To count the number of layers in the network

Why: Without non-linear activation functions, stacked layers would collapse into a single linear transformation. Non-linearity lets the network model complex, non-linear relationships in data.

Q3. What does the term 'layer' refer to in a neural network?
  • A. A group of neurons that process inputs in parallel at the same depth of the network ✓
  • B. A single weight value between two neurons
  • C. A copy of the training dataset
  • D. The loss value calculated after each epoch

Why: A layer is a collection of neurons operating at the same stage of the network. Common types include the input layer, hidden layers, and the output layer.

Q4. What is backpropagation used for in training a neural network?
  • A. To randomly reset the weights after each batch
  • B. To compute gradients of the loss with respect to each weight so the weights can be updated ✓
  • C. To increase the number of neurons during training
  • D. To convert categorical labels into numbers

Why: Backpropagation applies the chain rule to compute how much each weight contributed to the error. These gradients are then used by an optimizer, such as gradient descent, to adjust the weights.

Q5. What is a 'deep' neural network?
  • A. A network trained on very large datasets only
  • B. A network that uses only one neuron per layer
  • C. A network with many hidden layers between the input and output ✓
  • D. A network that does not use any activation functions

Why: A deep neural network contains multiple hidden layers, allowing it to learn hierarchical representations, with earlier layers capturing simple features and later layers capturing more complex ones.

Module 7 Module 7: Deploying and Monitoring Machine Learning Models

Deploying and Monitoring Machine Learning Models

Introduction

Core content I

Core content II

Core content III

Summary

Further learning

Knowledge check

Q1. What is the main purpose of deploying a machine learning model?
  • A. To make the model's predictions available for use in a real-world application or system ✓
  • B. To retrain the model on the original training dataset
  • C. To reduce the number of features used by the model
  • D. To convert the model into a spreadsheet format

Why: Deployment makes a trained model accessible so that it can receive new inputs and return predictions in a production environment, such as a web app, mobile app, or internal business system.

Q2. Which of the following best describes model monitoring?
  • A. Continuously tracking a deployed model's performance and behavior over time to detect issues ✓
  • B. Watching the training process until the model converges
  • C. Storing the model file on a local hard drive
  • D. Manually labeling new training data once

Why: Monitoring involves ongoing observation of metrics such as prediction accuracy, latency, and input data distributions after deployment, so teams can spot problems like performance degradation early.

Q3. What is data drift?
  • A. A change in the statistical properties of the input data that a model receives after deployment compared to the training data ✓
  • B. Errors caused by storing data in the wrong file format
  • C. The gradual loss of data from a database over time
  • D. A technique for shuffling training examples randomly

Why: Data drift occurs when the incoming data's distribution shifts away from what the model was trained on, which can cause predictions to become less accurate even though the model itself has not changed.

Q4. Why might a team choose to serve a model through a REST API?
  • A. It allows other applications to send inputs over HTTP and receive predictions in response ✓
  • B. It automatically improves the model's accuracy without retraining
  • C. It removes the need to monitor the model after deployment
  • D. It forces the model to run only on a single local computer

Why: Wrapping a model in a REST API is a common deployment pattern because it provides a standard, language-independent interface that any client application can call to get predictions.

Q5. What is a common action to take when a deployed model's performance has significantly degraded?
  • A. Ignore the decline because the original training results remain valid forever
  • B. Delete all monitoring logs to free up storage
  • C. Investigate the cause, such as data drift, and retrain or update the model with recent data ✓
  • D. Double the model's size without checking why performance dropped

Why: When performance drops, the best practice is to diagnose the root cause, often data drift or changing real-world conditions, and then retrain or update the model using current, representative data.

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