Rajiv Gandhi University of Knowledge Technologies
Catering to the Educational Needs of Gifted Rural Youth of Andhra Pradesh
(Established by the Govt. of Andhra Pradesh and recognized as per Section 2(f) of UGC Act, 1956)
Rajiv Knowledge Valley Campus
Department of Computer Science and Engineering
Machine Learning
Day-4
Presented by
R Sreenivas
Assistant Professor
RGUKT RK Valley
© Copyright 2024 ® All rights are reserved
Agenda
Concept Learning & Find-S algorithm
Candidate Elimination Algorithm
Perspectives and Issues in ML
Quote of the Day
Aptitude & Coding
Concept Learning
➢ Concept learning is a fundamental aspect of supervised
Concept Learning and
machine learning.
Find-S Algorithm
➢ The goal is to learn a mapping from inputs to outputs based
on labelled training data.
Size Color Fruit
If small and red, then apple.
Small Red Apple
If very small and red, then cherry.
Very Small Red Cherry
If small and orange, then orange.
Small Orange Orange
Concept Learning
Hypothesis
Hypothesis is a function that makes predictions based on the input data. It is
Concept Learning and
represented by ‘h’.
Find-S Algorithm
Example : h(x) : X -> Y
Hypothesis space
Hypothesis space is the set of all the possible legal hypothesis. It is
represented by ‘H’.
Hypothesis
Hypothesis Space
Classification Classification
Concept Learning
Version Space
Version Space is subset of hypotheses(H) consistent with training examples
(D). It is denoted by “V.S H,D “
Concept Learning and
Find-S Algorithm
V.S H,D = { h Є H | consistent (h , D) }
Specific hypothesis
Specific hypothesis is one that make precise, detailed predictions, matching
the exact attributes of the positive training examples. It is denoted by ‘hs’ or S
Example : hs (x) = 2x + 1
General hypothesis
General hypothesis is an abstract function that describes the relationship
between input features and output predictions. It is denoted by ‘hg’ or G
Example : hs (x) = mx + c
Find S Algorithm
Find-S algorithm is used in ML for learning a maximally specific
Concept Learning and
hypothesis from the given set of positive training example.
Find-S Algorithm
Algorithm
Load the data
Initialize the Specific Hypothesis (S)
S = { Ф, Ф, Ф, Ф, Ф, Ф }
For each positive training example
if the hypothesis h is consistent with example
do nothing
else
replace attribute value with ?
Find-S Algorithm
Sky Temperature Humidity Wind Water Forecast Play Cricket
Sunny Warm Normal Strong Warm Same Yes
Concept Learning and
Sunny Warm High Strong Warm Same Yes
Find-S Algorithm
Sunny Warm High Strong Cold Change Yes
Initialization
S = { Ф, Ф, Ф, Ф, Ф, Ф }
For example1 :
S = { sunny, warm, normal, strong, warm, same}
For example2 :
S = { sunny, warm, ? , strong, warm, same}
For example2 :
S = { sunny, warm, ? , strong, ? , ?}
In class assignment
Sunny Warm Normal Strong Warm Same Play Cricket
Yes Yes Yes Yes Yes Yes Yes
Concept Learning and
Yes Yes No Yes Yes Yes Yes
Find-S Algorithm
Yes Yes Yes Yes Yes No Yes
Candidate Elimination Algorithm
Candidate Elimination Algorithm
➢ The Candidate Elimination algorithm is a machine learning
algorithm used for concept learning and classification tasks
in a simple version of the "Version Space" model.
➢ It maintains a version space that includes all hypotheses
consistent with the observed training data.
➢ It makes a decision boundary based on specific hypothesis
and general hypothesis.
Candidate Elimination Algorithm
Candidate Elimination Algorithm
Load the data
Initialize Specific Hypothesis (S) and General Hypothesis(G)
S ={ Ф, Ф, Ф, Ф, …… } G = { ? , ? , ? , ?, . . . . }
For each training example
if example is positive
if attribute_value == hypothesis_value
Do nothing
else
replace attribute value with ‘ ? ‘ (
generalizing it)
if example is negative
Make generalize hypothesis more specific
Candidate Elimination Algorithm Candidate Elimination Algorithm
Sky Temperature Humidity Wind Water Forecast Play Cricket
Sunny Warm Normal Strong Warm Same Yes
Sunny Warm High Strong Warm Same Yes
Rainy Cold High Strong Warm Change No
Sunny Warm High Strong Cold Change Yes
Initialization
S = { Ф, Ф, Ф, Ф, Ф, Ф } G={?,?,?,?,?,?}
For example1 : (positive)
S = { sunny, warm, normal, strong, warm, same} G={?,?,?,?,?,?}
For example2 : (positive)
S = { sunny, warm, ? , strong, warm, same} G={?,?,?,?,?,?}
Candidate Elimination Algorithm Candidate Elimination Algorithm
Sky Temperature Humidity Wind Water Forecast Play Cricket
Sunny Warm Normal Strong Warm Same Yes
Sunny Warm High Strong Warm Same Yes
Rainy Cold High Strong Warm Change No
Sunny Warm High Strong Cold Change Yes
For example3 : (negative)
S = { sunny, warm, ? , strong, warm, same} G ={ { sunny , ? , ? , ? , ? , ? },
{ ? , warm, ? , ?, ? ,? },
{ ? , ? , ? , ? , ? , same } }
For example4 : (positive)
S = { sunny, warm, ? , strong, ? , ? } G ={ { sunny , ? , ? , ? , ? , ? },
{ ? , warm, ? , ?, ? ,? }}
Perspectives of Machine Learning
Algorithm Development: Creating and optimizing algorithms that can
Perspectives of ML
learn patterns from data, make predictions, and adapt over time.
Industry-Specific Applications : ML is applied across various industries,
such as healthcare, finance, transportation, and entertainment.
Human-AI Collaboration: AI to augment human capabilities and improve
collaboration. It involves designing systems where humans and AI can
work together effectively.
Cognitive Science and Psychology : It informs the design of machine
learning models that align more closely with human cognitive processes.
Perspectives of Machine Learning
Natural Language Processing (NLP): NLP is a specialized field within
Perspectives of ML
machine learning that deals with human language understanding and
generation. It involves developing models for tasks like sentiment
analysis, language translation, and chatbots.
Data Insights : Uncovering patterns and trends in vast datasets,
enabling informed decision-making and proactive strategies.
Ethical Imperatives : Addressing bias, fairness, privacy, and
transparency to ensure responsible and equitable AI systems.
Issues of Machine Learning
Data Quality and Quantity: ML performance heavily relies on high-quality and
abundant data. Insufficient or noisy data can lead to inaccurate predictions and
poor model generalization.
Issues of ML
Overfitting and Underfitting: Models can either overfitting or underfitting,
impacting their ability to generalize well to new data.
Lack of Generalization: Some models may perform well on training data but fail to
generalize to real-world situations, leading to poor performance when faced with
new, unseen data.
Data Privacy: As ML relies on data, maintaining privacy while still benefiting from
shared data is a significant concern, particularly in healthcare and finance.
Issues of Machine Learning
Human-AI Interaction: Designing effective and natural interactions between
humans and AI systems is challenging, and poor interfaces can lead to
Issues of ML
frustration and reduced usability.
Continuous Learning: Machine learning models often need to adapt to changing
data distributions and concepts over time. Developing systems that can learn
continuously and adaptively is a complex problem.
Scalability and Deployment: Scaling machine learning solutions from research
to production can be challenging due to technical, infrastructural, and
organizational complexities.
What is the potential consequence of using low-quality or noisy data
in machine learning?
In class assignments
A) It improves model generalization.
B) It has no impact on model performance.
C) It can lead to inaccurate predictions and poor generalization.
D) It increases model interpretability.
In class assignments Why is continuous learning important for machine learning systems?
A) It's not important; models are static after training.
B) It allows models to adapt to changing data distributions over time.
C) Continuous learning ensures the model remains unchanged.
D) Continuous learning only applies to supervised learning.
How does ethics play a role in machine learning development?
In class assignments
A) Ethics involves considering fairness, transparency, and
accountability in AI systems.
B) Ethics has no relevance in machine learning.
C) It ensures models are always accurate and unbiased.
D) Ethics only impacts data collection, not model development.
In version space learning, what does a version space represent?
In class assignments
A) The set of all possible data points in the training set.
B) The set of all possible hypotheses that are consistent with the
training data.
C) The final decision boundary of the machine learning model.
D) The set of noisy data points that should be discarded.
Which of the following is a characteristic of the Candidate
Elimination algorithm?
In class assignments
A) It maintains a boundary between the general and specific
hypotheses.
B) It can only represent specific hypotheses.
C) It is not affected by noisy data.
D) It requires labeled data for training.
Quote of the Day
Confidence and hard-word are the medicine to kill the
disease called failure.
It’s makes you to be Successful
Coding & Aptitude
238. Product of Array Except Self
Daily Assignments
Input : [1,2,3,4] Output: [24, 12, 8, 6]
A person crosses a 600 m long street in 5 minutes. What is
his speed in km per hour?
Thank
You