0% found this document useful (0 votes)
2 views5 pages

Machine Learning Revision

The document provides an overview of machine learning, including definitions of artificial intelligence and machine learning, the importance of data, and various learning processes. It discusses types of machine learning, benefits, model parameters, and evaluation techniques, as well as challenges and the necessity of updating models over time. Additionally, it outlines the steps involved in building a machine learning pipeline.

Uploaded by

Michael Blessing
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
2 views5 pages

Machine Learning Revision

The document provides an overview of machine learning, including definitions of artificial intelligence and machine learning, the importance of data, and various learning processes. It discusses types of machine learning, benefits, model parameters, and evaluation techniques, as well as challenges and the necessity of updating models over time. Additionally, it outlines the steps involved in building a machine learning pipeline.

Uploaded by

Michael Blessing
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd

MACHINE LEARNING REVISION

1a. Describe the term following terms i. Artificial Intelligence ii. Machine learning (6mks)
i. Artificial Intelligence (AI) is the ability of a computer system or machine to perform
tasks that normally require human intelligence. These tasks include learning from
experience, understanding language, recognizing patterns, solving problems, and making
decisions.
ii. Machine learning is a method of teaching computers to learn automatically from data and
make predictions or decisions based on patterns discovered in that data.

b. Why does a machine need data to learn and give one real-life example of machine learning.
(6mks)
Machines need data because data is the experience from which they learn. Unlike humans,
machines do not have intuition or prior knowledge — they rely completely on information
provided to them.
In machine learning, data serves three main purposes:
i. Pattern Recognition –
ii. Model Training
iii. Prediction and Decision Making

c. Explain five reasons why Machine Learning is important. (10mks)


i. Improves Decision-Making
ii. Automation of Tasks
iii. Enhances Accuracy
iv. Personalization
v. Solves Complex Problems

2a. List and explain five learning process in machine learning (5mks)
i. Data Collection: Gathering raw data from various sources such as databases, APIs,
websites, sensors, and files
ii. Data Preprocessing (Cleaning): Raw data is rarely usable. This step involves cleaning
(removing noise and outliers), handling missing values, normalization, and transforming
data into a structured format suitable for machine learning algorithms.
iii. Model Selection and Training: Choosing an appropriate algorithm (e.g., Linear
Regression, Random Forest, Neural Networks) based on the problem type (supervised or
unsupervised).
iv. Evaluation: Testing the model on a separate, unseen dataset to check its accuracy and
reliability.
v. Model Deployment (Inference): After successful evaluation, the model is integrated into
a real-world application (e.g., a website or software) to perform predictions on new, live
data.

b. Discuss Unsupervised learning (2mks)


Unsupervised Learning: In this process, the machine learns from unlabeled data. There are no
predefined answers. The system tries to identify patterns, groupings, or relationships on its
own.
Example: Customer segmentation where customers are grouped based on purchasing
behavior.

c. Mention five application of Machine learning (5mks)


i. Email Spam Detection
ii. Fraud Detection in Banking
iii. Recommendation Systems
iv. Medical Diagnosis
v. Speech and Image Recognition

3a. Mention the types of machine learning (3mks)


i. Supervised Learning: The model is trained using labeled data (input with correct output).
ii. Unsupervised Learning: The model learns patterns from unlabeled data without
predefined answers.
iii. Reinforcement Learning: The model learns through trial and error using rewards and
penalties.

b. Discuss three (3) Benefit of Machine Learning (6mks)


i. Improves Accuracy and Decision-Making: Machine learning analyzes large amounts of
data to identify patterns and trends.
ii. Automation of Tasks: Machine learning automates repetitive and time-consuming tasks
such as data entry, spam filtering, fraud detection, and customer support.
iii. Handles Large and Complex Data: Machine learning systems can process and analyze
huge volumes of data that humans cannot easily manage.

c. What are model parameters? (3mks)


Model parameters are the internal variables of a machine learning model that are learned
automatically from training data. They determine how the model makes predictions.

4a. Define the term machine learning Pipeline (3mks)


A Machine Learning Pipeline is a step-by-step process used to build, train, evaluate, and deploy
a machine learning model in an organized and systematic way.

b. St ate five steps to build Machine Learning Pipeline (5mks)


i. Data Collection
ii. Data Preprocessing (Cleaning)
iii. Feature Engineering/Selection
iv. Model Training
v. Model Evaluation

c. Mention two difference between Machine learning and Artificial Intelligence (4mks)
Artificial Intelligence (AI) Machine Learning (ML)
AI is a broad field that focuses on creating
ML is a subset of AI that enables machines to
machines that can perform tasks requiring
learn from data and improve automatically.
human intelligence.
AI can operate using predefined rules and ML depends on data and algorithms to learn
logic. patterns and make predictions.

5a. List and explain the three types of Machine learning (6mks)
1. Supervised Learning: Supervised learning is a type of machine learning where the model is
trained using labeled data. Example: Predicting house prices using past data where the prices are
already known.
2. Unsupervised Learning: Unsupervised learning is used when the model is trained with
unlabeled data. Example: Grouping customers based on purchasing behavior (customer
segmentation).
3. Reinforcement Learning: Reinforcement learning is a type of learning where the model
learns through trial and error.

b. Mention three (3) challenges of machine learning (3mks)


i. Data Quality and Quantity
ii. Overfitting and Underfitting
iii. Interpretability and Explainability

c. What is hyperparameter in machine Learning (3mks)


In machine learning, a hyperparameter is a parameter whose value is set before the learning
process begins and controls the behavior of the learning algorithm.

6a. What is Overfitting in machine Learning? (2mks)


In machine learning, overfitting occurs when a model learns the training data too well, including
its noise and random fluctuations, instead of capturing the underlying patterns.

b. Highlight four different Model Evaluation Techniques in Machine Learning (4mks)


i. Train-Test Split
ii. K-Fold Cross-Validation
iii. Leave-One-Out Cross-Validation (LOOCV)
iv. Confusion Matrix & Derived Metrics
c. Explain three of the Model Evaluation Techniques (6mks)
i. Train-Test Split: The dataset is divided into two parts: a training set (to train the model)
and a test set (to evaluate its performance).
ii. K-Fold Cross-Validation: The dataset is split into k equal parts (folds). The model is
trained on k–1 folds and tested on the remaining fold.
iii. Leave-One-Out Cross-Validation (LOOCV): A special case of k-fold where k equals the
number of samples. Each sample is used once as the test set, and the rest are used for
training.

7a. Discuss the first step when using Python to build an ML model? (6mks)
Data Collection and Loading
Collect the data: You need a dataset relevant to the problem you want to solve. Data can come
from:
i. CSV/Excel files
ii. Databases (SQL, MongoDB, etc.)
iii. APIs or web scraping
iv. Built-in datasets from libraries like scikit-learn or seaborn

7b. Why do we split data into training and testing sets? (3mks)
i. Prevents overfitting
ii. Measures real-world performance
iii. Helps in model selection and tuning

7c. Why should a model be updated over time? (3mks)


A machine learning model should be updated over time to ensure it remains accurate, relevant,
and effective in changing environments.

You might also like