0% found this document useful (0 votes)
11 views60 pages

Machine Learning - Lect 7

The document provides an overview of machine learning, explaining its definition, types, advantages, and disadvantages. It details the processes involved in machine learning, including data collection and model training, and distinguishes between supervised, unsupervised, and reinforcement learning. Additionally, it highlights the importance of data and algorithms in enabling machines to learn and make decisions similar to humans.

Uploaded by

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

Machine Learning - Lect 7

The document provides an overview of machine learning, explaining its definition, types, advantages, and disadvantages. It details the processes involved in machine learning, including data collection and model training, and distinguishes between supervised, unsupervised, and reinforcement learning. Additionally, it highlights the importance of data and algorithms in enabling machines to learn and make decisions similar to humans.

Uploaded by

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

MACHINE LEARNING

Dr. Nana Yaw Duodu


Computer Science Department
Accra Technical University
COMPUTER SCIENCE DEPARTMENT

Human can learn from past experience


and make decision of its own

7/15/2025 FACULTY OF APPLIED SCIENCES 2


COMPUTER SCIENCE DEPARTMENT

What is this object?

7/15/2025 FACULTY OF APPLIED SCIENCES 3


COMPUTER SCIENCE DEPARTMENT

What is this object?

CAR

CAR

BIKE
It is a CAR
BIKE

7/15/2025 FACULTY OF APPLIED SCIENCES 4


Let us ask the same question to him
COMPUTER SCIENCE DEPARTMENT

What is this object?

7/15/2025 FACULTY OF APPLIED SCIENCES 5


Let us ask the same question to him
COMPUTER SCIENCE DEPARTMENT

? What is this object?

7/15/2025 FACULTY OF APPLIED SCIENCES 6


COMPUTER SCIENCE DEPARTMENT

[ But, he is a human being. He can observe and learn ]

7/15/2025 FACULTY OF APPLIED SCIENCES 7


Let us make him learn
COMPUTER SCIENCE DEPARTMENT

show him CAR

CAR

BIKE

BIKE

7/15/2025 FACULTY OF APPLIED SCIENCES 8


Let us ask the same question now
COMPUTER SCIENCE DEPARTMENT

What is this object?

CAR

CAR

BIKE

BIKE
Past
Past experience
experience
7/15/2025 FACULTY OF APPLIED SCIENCES 9
Let us ask the same question now
COMPUTER SCIENCE DEPARTMENT

CAR What is this object?

CAR

CAR

BIKE
BIKE

7/15/2025 FACULTY OF APPLIED SCIENCES 10


What about a Machine ?
COMPUTER SCIENCE DEPARTMENT

We can ask a machine

• To perform an arithmetic operations such as


• Addition
• Multiplication
• Division
Machines follow instructions

[ It can not take decision of its own]


7/15/2025 FACULTY OF APPLIED SCIENCES 11
What about a Machine ?
COMPUTER SCIENCE DEPARTMENT

• Comparison

• Print

• Plotting a chart

Machines follow instructions

[ But, we can ask a machine to make a decision of its own ]


7/15/2025 FACULTY OF APPLIED SCIENCES 12
What is Machine Learning?
COMPUTER SCIENCE DEPARTMENT

[ We want a machine to act like a human]

7/15/2025 FACULTY OF APPLIED SCIENCES 13


What is Machine Learning?
COMPUTER SCIENCE DEPARTMENT

to identify this object

7/15/2025 FACULTY OF APPLIED SCIENCES 14


What is Machine Learning?
COMPUTER SCIENCE DEPARTMENT

Price in 2025?
predict the price in future

7/15/2025 FACULTY OF APPLIED SCIENCES 15


What is Machine Learning?
COMPUTER SCIENCE DEPARTMENT

I made met him yesterday

[ Natural Language understand, and correct grammar ]

7/15/2025 FACULTY OF APPLIED SCIENCES 16


What is Machine Learning?
COMPUTER SCIENCE DEPARTMENT

recognize face

Recognize Faces
7/15/2025 FACULTY OF APPLIED SCIENCES 17
What is Machine Learning?
COMPUTER SCIENCE DEPARTMENT

• To train the machine


• What do we do?

• Just like, what we did to human,

• we need to provide experience to


the machine.

7/15/2025 FACULTY OF APPLIED SCIENCES 18


What is Machine Learning?
COMPUTER SCIENCE DEPARTMENT

• This what we called as Data or


Training dataset
+ • So, we first need to provide
training dataset to the machine

Dataset

7/15/2025 FACULTY OF APPLIED SCIENCES 19


What is Machine Learning?
COMPUTER SCIENCE DEPARTMENT

+ +
• Then, devise algorithms and execute
programs on the data

Dataset
• With respect to the underlying target
tasks
7/15/2025 FACULTY OF APPLIED SCIENCES 20
What about a Machine ?
COMPUTER SCIENCE DEPARTMENT

+ + +
Then, using the
programs, Identify
Dataset
required rules

7/15/2025 FACULTY OF APPLIED SCIENCES 21


What is Machine Learning?
COMPUTER SCIENCE DEPARTMENT

+ + +

extract required
Dataset patterns

7/15/2025 FACULTY OF APPLIED SCIENCES 22


What is Machine Learning?
COMPUTER SCIENCE DEPARTMENT

+ + +

Dataset
Identify relations
7/15/2025 FACULTY OF APPLIED SCIENCES 23
What is Machine Learning?
COMPUTER SCIENCE DEPARTMENT

+ + + +

Dataset So that machine can derive


inferences from the data
7/15/2025 FACULTY OF APPLIED SCIENCES 24
What is Machine Learning?
COMPUTER SCIENCE DEPARTMENT

DEFINITION:
Machine learning is the branch of Artificial Intelligence that
focuses on developing models and algorithms that let
computers learn from data and improve from previous
experience without being explicitly programmed for every task.

In simple words, ML teaches the systems to think and


understand like humans by learning from the data.
7/15/2025 FACULTY OF APPLIED SCIENCES 25
HOW DOES MACHINE LEARNING WORK?
COMPUTER SCIENCE DEPARTMENT

• Step 1: Data collection. The first step in the machine learning process is data
collection.
• Step 2: Data preprocessing.
• Step 3: Choosing the right model.
• Step 4: Training the model.
• Step 5: Evaluating the model.
• Step 6: Hyperparameter tuning and optimization.
• Step 7: Predictions and deployment.
7/15/2025 FACULTY OF APPLIED SCIENCES 26
HOW DOES MACHINE LEARNING WORK?
COMPUTER SCIENCE DEPARTMENT

7/15/2025 FACULTY OF APPLIED SCIENCES 27


HOW DOES MACHINE LEARNING WORK?
COMPUTER SCIENCE DEPARTMENT

7/15/2025 FACULTY OF APPLIED SCIENCES 28


ADVANTAGES OF ML
COMPUTER SCIENCE DEPARTMENT
• Solving Vision Problems through Statistical Inference: AI systems leverage statistical models and
machine learning algorithms to solve complex vision tasks, such as object detection, pattern recognition,
and image segmentation, with improved accuracy.
• Common Sense and General Intelligence: Advanced AI systems are increasingly being equipped with
common sense reasoning capabilities, enabling them to make intelligent decisions beyond programmed
logic mimicking human-like judgment in visual interpretation.
• Adaptive Autonomy Over Time: AI models can learn and improve their performance over time by
minimizing the constraints imposed during training. This results in increasingly autonomous systems
that require less human intervention as they adapt to their environments.
• Application-Specific Algorithms: Custom-designed algorithms tailored to specific applications (e.g.,
medical imaging, autonomous driving, industrial inspection) ensure that AI vision systems operate
efficiently and accurately within their domains.
• Real-Time Processing and Automation: AI-powered vision systems can perform tasks in real-time,
enabling automation in various fields such as manufacturing, security surveillance, and robotics.
• Consistency and Fatigue Resistance: Unlike humans, AI systems do not suffer from fatigue or
inconsistency, making them ideal for repetitive and high-precision visual tasks.

7/15/2025 FACULTY OF APPLIED SCIENCES 29


DISADVANTAGES OF ML
COMPUTER SCIENCE DEPARTMENT

• High Computational Complexity


• Noisy and Unreliable Sensor Data
• Too Many Variables in Real-World Problems
• Data Dependency and Bias
• Lack of Interpretability
• Cost of Implementation and Maintenance
• Ethical and Privacy Concerns
7/15/2025 FACULTY OF APPLIED SCIENCES 30
TYPES OF ML
COMPUTER SCIENCE DEPARTMENT

7/15/2025 FACULTY OF APPLIED SCIENCES 31


TYPES OF ML
COMPUTER SCIENCE DEPARTMENT

7/15/2025 FACULTY OF APPLIED SCIENCES 32


SUPERVISED MACHINE LEARNING
COMPUTER SCIENCE DEPARTMENT

• Supervised learning is defined as when a model gets trained on a "Labelled Dataset".

• Labelled datasets have both input and output parameters.

• In Supervised Learning algorithms learn to map points between inputs and correct
outputs.

• It has both training and validation datasets labelled.

• Goal: Learn a mapping from inputs to outputs to make predictions on new, unseen
data.

7/15/2025 FACULTY OF APPLIED SCIENCES 33


SUPERVISED MACHINE LEARNING
COMPUTER SCIENCE DEPARTMENT

7/15/2025 FACULTY OF APPLIED SCIENCES 34


SUPERVISED MACHINE LEARNING
COMPUTER SCIENCE DEPARTMENT

• Examples:

• Classification: Email spam detection, disease diagnosis

• Regression: Predicting house prices, stock market trends

7/15/2025 FACULTY OF APPLIED SCIENCES 35


SUPERVISED MACHINE LEARNING
COMPUTER SCIENCE DEPARTMENT

• Classification deals with predicting categorical target variables,


which represent discrete classes or labels.
• Classification Algorithms:
• Linear Regression
• Logistic Regression
• Decision Trees
• Random Forest
• Support Vector Machines (SVM)
• Neural Networks

7/15/2025 FACULTY OF APPLIED SCIENCES 36


SUPERVISED MACHINE LEARNING
COMPUTER SCIENCE DEPARTMENT

• Advantages of Supervised Machine Learning


• Supervised Learning models can have high accuracy as they are
trained on labelled data.
• The process of decision-making in supervised learning models is
often interpretable.
• It can often be used in pre-trained models which saves time and
resources when developing new models from scratch.
7/15/2025 FACULTY OF APPLIED SCIENCES 37
SUPERVISED MACHINE LEARNING
COMPUTER SCIENCE DEPARTMENT

• Disadvantages of Supervised Machine Learning


• It has limitations in knowing patterns and may struggle with
unseen or unexpected patterns that are not present in the training
data.
• It can be time-consuming and costly as it relies on labeled data
only.
• It may lead to poor generalizations based on new data.
7/15/2025 FACULTY OF APPLIED SCIENCES 38
UNSUPERVISED MACHINE LEARNING
COMPUTER SCIENCE DEPARTMENT

• Unsupervised learning is a type of machine learning technique in which an algorithm


discovers patterns and relationships using unlabeled data.

• Unlike supervised learning, unsupervised learning does not involve providing the
algorithm with labeled target outputs.

• The primary goal of Unsupervised learning is often to discover hidden patterns,


similarities, or clusters within the data, which can then be used for various purposes,
such as data exploration, visualization, dimensionality reduction, and more.

7/15/2025 FACULTY OF APPLIED SCIENCES 39


UNSUPERVISED LEARNING
COMPUTER SCIENCE DEPARTMENT

7/15/2025 FACULTY OF APPLIED SCIENCES 40


UNSUPERVISED LEARNING
COMPUTER SCIENCE DEPARTMENT

• Examples:
• Customer segmentation
• Anomaly detection
• Market basket analysis
• Algorithms:
• K-Means Clustering
• Hierarchical Clustering
• Principal Component Analysis (PCA)
• DBSCAN
7/15/2025 FACULTY OF APPLIED SCIENCES 41
UNSUPERVISED LEARNING
COMPUTER SCIENCE DEPARTMENT

• There are two main categories of unsupervised learning that


are mentioned below:
• Clustering
• Association

7/15/2025 FACULTY OF APPLIED SCIENCES 42


UNSUPERVISED LEARNING
COMPUTER SCIENCE DEPARTMENT

• Clustering
• Clustering is the process of grouping data points into clusters based on their similarity. This
technique is useful for identifying patterns and relationships in data without the need for
labeled examples.
• Some clustering algorithms:
• K-Means Clustering algorithm
• Mean-shift algorithm
• DBSCAN Algorithm
• Principal Component Analysis
• Independent Component Analysis

7/15/2025 FACULTY OF APPLIED SCIENCES 43


UNSUPERVISED LEARNING
COMPUTER SCIENCE DEPARTMENT

• Association:
• Association rule learning is a technique for discovering relationships
between items in a dataset. It identifies rules that indicate the presence of
one item implies the presence of another item with a specific probability.
• Here are some association rule learning algorithms:
• Apriori Algorithm
• Eclat
• FP-growth Algorithm
7/15/2025 FACULTY OF APPLIED SCIENCES 44
UNSUPERVISED LEARNING
COMPUTER SCIENCE DEPARTMENT

• Advantages of Unsupervised Machine Learning


• It helps to discover hidden patterns and various relationships between the
data.
• Used for tasks such as customer segmentation, anomaly
detection, and data exploration.
• It does not require labeled data and reduces the effort of data labeling.

7/15/2025 FACULTY OF APPLIED SCIENCES 45


UNSUPERVISED LEARNING
COMPUTER SCIENCE DEPARTMENT

• Disadvantages of Unsupervised Machine Learning


• Without using labels, it may be difficult to predict the quality of the model's
output.
• Cluster Interpretability may not be clear and may not have meaningful
interpretations.
• It has techniques such as autoencoders and dimensionality reduction that
can be used to extract meaningful features from raw data.

7/15/2025 FACULTY OF APPLIED SCIENCES 46


REINFORCEMENT MACHINE LEARNING
COMPUTER SCIENCE DEPARTMENT

• Reinforcement machine learning algorithm is a learning method that interacts with the
environment by producing actions and discovering errors.
• Trial, error, and delay are the most relevant characteristics of reinforcement learning.
• In this technique, the model keeps on increasing its performance using Reward
Feedback to learn the behavior or pattern.
• These algorithms are specific to a particular problem e.g. Google Self Driving car,
AlphaGo where a bot competes with humans and even itself to get better and better
performers in Go Game.

7/15/2025 FACULTY OF APPLIED SCIENCES 47


REINFORCEMENT MACHINE LEARNING
COMPUTER SCIENCE DEPARTMENT

7/15/2025 FACULTY OF APPLIED SCIENCES 48


REINFORCEMENT MACHINE LEARNING
COMPUTER SCIENCE DEPARTMENT

7/15/2025 FACULTY OF APPLIED SCIENCES 49


REINFORCEMENT MACHINE LEARNING
COMPUTER SCIENCE DEPARTMENT

• Advantages of Reinforcement Machine Learning


• It has autonomous decision-making that is well-suited for tasks and that can
learn to make a sequence of decisions, like robotics and game-playing.
• This technique is preferred to achieve long-term results that are very difficult
to achieve.
• It is used to solve a complex problems that cannot be solved by conventional
techniques.

7/15/2025 FACULTY OF APPLIED SCIENCES 50


REINFORCEMENT MACHINE LEARNING
COMPUTER SCIENCE DEPARTMENT

• Disadvantages of Reinforcement Machine Learning


• Training Reinforcement Learning agents can be computationally
expensive and time-consuming.
• Reinforcement learning is not preferable to solving simple problems.
• It needs a lot of data and a lot of computation, which makes it
impractical and costly.

7/15/2025 FACULTY OF APPLIED SCIENCES 51


TYPES OF REINFORCEMENT MACHINE LEARNING
COMPUTER SCIENCE DEPARTMENT

• Positive reinforcement
• Rewards the agent for taking a desired action.

• Encourages the agent to repeat the behavior.

• Examples: Giving a treat to a dog for sitting, providing a point in a game for a correct answer.

• Negative reinforcement
• Removes an undesirable stimulus to encourage a desired behavior.

• Discourages the agent from repeating the behavior.

• Examples: Turning off a loud buzzer when a lever is pressed, avoiding a penalty by completing a task.

7/15/2025 FACULTY OF APPLIED SCIENCES 52


SEMI-SUPERVISED LEARNING
COMPUTER SCIENCE DEPARTMENT

• Semi-Supervised learning is a machine learning algorithm that works between the


supervised and unsupervised learning so it uses both labelled and unlabelled data.

• It is particularly useful when obtaining labeled data is costly, time-consuming, or


resource-intensive.

• This approach is useful when the dataset is expensive and time-consuming.

• Semi-supervised learning is chosen when labeled data requires skills and relevant
resources in order to train or learn from it.

7/15/2025 FACULTY OF APPLIED SCIENCES 53


SEMI-SUPERVISED LEARNING
COMPUTER SCIENCE DEPARTMENT

7/15/2025 FACULTY OF APPLIED SCIENCES 54


TYPES OF MACHINE LEARNING
COMPUTER SCIENCE DEPARTMENT

Type Data Type Learning Goal Example Use Case


Spam detection,
Supervised Labeled Predict known outcomes
stock prices
Discover patterns or Customer
Unsupervised Unlabeled
groups segmentation
Semi- Improve learning with
Partially Labeled Medical diagnostics
Supervised limited labels
Maximize reward over
Reinforcement Feedback-based Game bots, robotics
time
7/15/2025 FACULTY OF APPLIED SCIENCES 55
DEEP LEARNING
COMPUTER SCIENCE DEPARTMENT

• Deep learning is a subset of machine learning that uses artificial neural networks
with multiple layers (deep neural networks) to analyze and learn from data.
• These networks can automatically extract features and patterns from data,
making them capable of solving complex problems like image recognition,
natural language processing, and speech recognition.

7/15/2025 FACULTY OF APPLIED SCIENCES 56


HOW DOES DEEP LEARNING WORK
COMPUTER SCIENCE DEPARTMENT

• Deep learning models simulate the way the human brain processes
information. They consist of multiple layers:

• Input Layer – Receives the data (e.g., pixel values of an image).

• Hidden Layers – Perform computations, extract features, and detect patterns.

• Output Layer – Produces the final prediction or classification.

• Each layer contains neurons, which apply weighted inputs and activation
functions (e.g., ReLU, sigmoid) to learn complex relationships.

7/15/2025 FACULTY OF APPLIED SCIENCES 57


HOW DOES DEEP LEARNING WORK
COMPUTER SCIENCE DEPARTMENT

Model Type Purpose Example Use Case

CNN (Convolutional Neural


Best for image and video processing Medical imaging, face recognition
Network)

Handles sequence data with Speech recognition, language


RNN (Recurrent Neural Network)
memory modeling

Improved RNN for long-term Machine translation, time series


LSTM (Long Short-Term Memory)
dependencies prediction

GAN (Generative Adversarial Generates new data similar to Deepfake creation, data
Network) training data augmentation

Processes sequences in parallel with


Transformer ChatGPT, BERT, language tasks
attention

7/15/2025 FACULTY OF APPLIED SCIENCES 58


NATURE OF VISUALIZATION
COMPUTER SCIENCE DEPARTMENT

7/15/2025 FACULTY OF APPLIED SCIENCES 59


NATURE OF VISUALIZATION
COMPUTER SCIENCE DEPARTMENT

7/15/2025 FACULTY OF APPLIED SCIENCES 60

You might also like