0% found this document useful (0 votes)
9 views

Unit-5_1

Uploaded by

Ajay
Copyright
© © All Rights Reserved
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
9 views

Unit-5_1

Uploaded by

Ajay
Copyright
© © All Rights Reserved
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 88

UNIT – V:

Learning: What is learning, Learning by Taking


Advice, Learning in Problem-solving, Learning
from example: induction, Explanation-based
learning.

Expert System:
Representing and using Domain Knowledge,
Reasoning with knowledge,
Expert System Shells-examples,
Knowledge acquisition skills-examples
What is learning?
• According to Herbert Simon, learning denotes
changes in a system that enable a system to
do the same task more efficiently the next
time.
• Learning is a an area of AI that focuses on
process of self-improvement.
• Information processes that improve their
performance or enlarge their knowledge bases
are said to learn.
What is learning?
Why is it hard?
• Intelligence implies that an organism or
machine must be able to adapt to new
situations.
• It must be able to learn to do new things.
• This requires knowledge acquisition, inference,
updating/refinement of knowledge base,
acquisition of heuristics, applying faster
searches etc.
Learning
• The following tasks must be learned by an
agent.
• To predict or decide the result state for an
action.
• To know the values for each state(understand
which state has high or low value).
• To keep record of relevant percepts.
1. Rote Learning (memorization): Memorizing things
without knowing the concept/ logic behind them
2. Passive Learning (instructions): Learning from a
teacher/expert.
3. Analogy (experience): Learning new things from
our past experience.
4. Inductive Learning (experience): On the basis of
past experience formulating a generalized concept.
5. Deductive Learning: Deriving new facts from
past facts.
Why do we require machine learning?
• Machine learning plays an important role in
improving and understanding the efficiency of
human learning.
• Machine learning is used to discover a new
things not known to many human beings.
Methods of Learning.
 Skill refinement : one can learn by practicing,
e.g playing the piano.
 Knowledge acquisition: one can learn by
experience and by storing the experience in a
knowledge base.
 Taking advice: Similar to rote learning.
although the knowledge that is input may
need to be transformed (or operationalised) in
order to be used effectively.
Methods of Learning.
 Problem Solving : if we solve a problem one may learn from
this experience. The next time we see a similar problem we
can solve it more efficiently. This does not usually involve
gathering new knowledge but may involve reorganization of
data or remembering how to achieve to solution.
 Induction : One can learn from examples. Humans often
classify things in the world without knowing explicit rules.
Usually involves a teacher or trainer to aid the classification.
 Discovery : Here one learns knowledge without the aid of a
teacher.
 Analogy : If a system can recognize similarities in
information already stored then it may be able to transfer
some knowledge to improve to solution of the task in hand.
What is rote learning

Rote learning is possible on the basis of


memorization.
• This technique mainly focuses on
memorization by avoiding the inner
complexities. So, it becomes possible for the
learner to recall the stored knowledge.
For example: When a learner learns a poem
or song by reciting or repeating it, without
knowing the actual meaning of the poem or
song.
Learning by taking advice
• The idea of advice taking in AI based learning was
proposed as early as 1958 (McCarthy).
• There are two basic approaches to advice taking:
1. Take high level, abstract advice and convert it
into rules that can guide performance elements of
the system. Automate all aspects of advice taking
2. Develop sophisticated tools such as knowledge
base editors and debugging. These are used to aid
an expert to translate his expertise into detailed
rules.
Learning by taking advice
• This is a simple form of learning. Suppose a
programmer writes a set of instructions to instruct
the computer what to do, the programmer is a
teacher and the computer is a student. Once
learned (i.e. programmed), the system will be in a
position to do new things.
• The knowledge must be transformed into an
operational form before stored in the knowledge
base. Moreover the reliability of the source of
knowledge should be considered.
Learning by taking advice
• FOO (First Operational Operationaliser), for
example, is a learning system which is used to
learn the game of Hearts. It converts the
advice which is in the form of principles,
problems, and methods into effective
executable (LISP) procedures (or knowledge)
Learning from Example :Induction
• A process of learning by example. The system tries to
induce a general rule from a set of observed instances.
• The learning methods extract rules and patterns out of
massive data sets.
• The learning processes belong to supervised learning, does
classification and constructs class definitions, called
induction or concept learning.
• The techniques used for constructing class definitions (or
concept leaning) are :

1 Winston's Learning program


2 Version Spaces
3 Decision Trees
• Concept learning: Concept learning is basically the
learning task of the machine (Learn by Train data)
• General Hypothesis: Not Specifying features to learn the
machine.
• G = {‘?’, ‘?’,’?’,’?’…}: Number of attributes
• Specific Hypothesis: Specifying features to learn machine
(Specific feature)
• S= {‘pi’,’pi’,’pi’…}: The number of pi depends on a number
of attributes.
• Version Space: It is an intermediate of general hypothesis
and Specific hypothesis.
• It not only just writes one hypothesis but a set of all
possible hypotheses based on training data-set.
Candidate Elimination Algorithm
Algorithm:

Step1: Load Data set


Step2: Initialize General Hypothesis and Specific
Hypothesis.
Step3: For each training example
Step4: If example is positive example
if attribute_value == hypothesis_value:
Do nothing
else:
replace attribute value with '?' (Basically generalizing it)
Step5: If example is Negative example
Make generalize hypothesis more specific.
Version Space – Problem 1

Learning the concept of "Japanese Economy


Car“
Step by step solution :
Example

Concept: Days on which person enjoy sports


Algorithmic steps:

Initially : G = [[?, ?, ?, ?, ?, ?], [?, ?, ?, ?, ?, ?], [?, ?, ?, ?, ?, ?],


[?, ?, ?, ?, ?, ?], [?, ?, ?, ?, ?, ?], [?, ?, ?, ?, ?, ?]]
S = [Null, Null, Null, Null, Null, Null]

For instance 1 :
<'sunny','warm','normal','strong','warm ','same'>
and positive output.
G1 = G
S1 = ['sunny','warm','normal','strong','warm ','same']

For instance 2 :
<'sunny','warm','high','strong','warm ','same'>
and positive output.
G2 = G
S2 = ['sunny','warm',?,'strong','warm ','same']
For instance 3 :
<'rainy','cold','high','strong','warm ','change'>
and negative output.
G3 = [['sunny', ?, ?, ?, ?, ?], [?, 'warm', ?, ?, ?, ?],
[?, ?, ?, ?, ?, 'same']]
S3 = S2

For instance 4 : <'sunny','warm','high','strong','cool','change'> and


positive output.
G4 = [['sunny', ?, ?, ?, ?, ?], [?, 'warm', ?, ?, ?, ?]]
S4 = ['sunny','warm',?,'strong', ?, ?]

Output :
G = [['sunny', ?, ?, ?, ?, ?], [?, 'warm', ?, ?, ?, ?]]
S = ['sunny','warm',?,'strong', ?, ?]
Decision Tree
• Decision Tree is the most powerful and popular
tool for classification and prediction.
• A Decision tree is a flowchart-like tree
structure, where each internal node denotes a
test on an attribute, each branch represents an
outcome of the test, and each leaf node
(terminal node) holds a class label.
• It uses ID3 program to build decision tree .
Decision Tree
Decision Tree
• It begins by choosing random subset of the
training instance. This is called window.
• The algorithm builds the decision tree that
correctly classifies all examples in the window.
• The tree is then tested on the training
examples outside the window.
• If all examples are classified correctly.
Algorithm halts.
• Otherwise adds more examples in the window
and process repeats.
Explanation-based Learning
Explanation-based Learning
Explanation-based Learning
Explanation-based Learning
Explanation-based Learning

You might also like