2. Definition
ā¢Learning covers a broad range of processes
ā¢To gain
ā¢ Knowledge
ā¢ Or understand of
ā¢ Or skill in
ā¢ By study, instruction, or experience
3. Learning
ā¢ Learning is essential for unknown environments,
ā¢ i.e., when designer lacks omniscience
ā¢ Learning is useful as a system construction method,
ā¢ i.e., expose the agent to reality rather than trying to write it down
ā¢ Learning modifies the agent's decision mechanisms to improve
performance
An agent is learning if it improves its performance on future tasks after making observations
about the world
4. Why Learning?
ā¢Three main reasons
ā¢First, the designers cannot anticipate all possible
situations that the agent might find itself in.
ā¢Second, the designers cannot anticipate all changes
over time.
ā¢Third, sometimes human programmers have no idea
how to program a solution themselves.
5. Forms of Learning
ā¢ Any component of an agent can be improved by learning
from data. The improvements, and the techniques used to
make them, depend on four major factors:
ā¢ Which component is to be improved
ā¢ What prior knowledge the agent already has.
ā¢ What representation is used for the data and the component.
ā¢ What feedback is available to learn from.
6. Components to be
learned
ā¢ The components of these agents include:
ļ¼ A direct mapping from conditions on the current state to
actions.
ļ¼ A means to infer relevant properties of the world from the
percept sequence.
ļ¼ Information about the way the world evolves and about the
results of possible actions the agent can take.
ļ¼ Utility information indicating the desirability of world states.
ļ¼ Action-value information indicating the desirability of actions.
ļ¼ Goals that describe classes of states whose achievement
maximizes the agentās utility.
7. Representatio
n and prior
knowledge
ā¢ We have seen
several examples of
representations for
agent components:
propositional and
first-order logical
sentences for the
components in a
logical agent;
8. Feedback to learn from
ā¢ There are three types of feedback that determine the three main
types of learning:
ā¢ Supervised learning: correct answers for each example (or) the agent
observes some example inputāoutput pairs and learns a function that
maps from input to output
ā¢ Unsupervised learning: correct answers not given (or) the agent
learns patterns in the input even though no explicit feedback is
supplied. Example: Clustering.
ā¢ Reinforcement learning: occasional positive and/or negative rewards
(or) the agent learns from a series of reinforcementsārewards or
punishments.
9. Example
Performance
Element
Component Representation Feedback
Alpha-Beta Pruning Eval. Funtion Weighted Linear
Function
Win/Loss
Logical Agent Transition Model Successor State-
axioms
Outcome
Utility-Based Agent Transition Model Dynamic Bayes
Network
Outcome
Simple Reflex
Agent
Percept-action Neural Network Correction action
11. Summary of
Learning
ā¢ Any situation in which both the inputs and
outputs of a component can be perceived is
called supervised learning.
ā¢ In learning the condition-action component, the
agent receives some evaluation of its action but
is not told the correct action. This is
called reinforcement learning.
ā¢ Learning when there is no hint at all about the
correct outputs is called unsupervised
learning.
12. Inductive Learning
This involves the process of learning by example -- where a system tries to
induce a general rule from a set of observed instances.
13. Continueā¦
ā¢ This involves classification -- assigning, to a
particular input, the name of a class to which it
belongs. Classification is important to many problem
solving tasks.
ā¢ A learning system has to be capable of evolving its
own class descriptions:
ā¢ Initial class definitions may not be adequate.
ā¢ The world may not be well understood or rapidly changing.
ā¢ The task of constructing class definitions is called
induction or concept learning
14. Continueā¦
ā¢ Simplest form: learn a function from examples f is the
target function An example is a pair (x, f(x))
ā¢ Problem: find a hypothesis h such that h ā f given a training
set of examples
ā¢ This is a highly simplified model of real learning:
ā¢ Ignores prior knowledge
ā¢ Assumes a deterministic, observable environment
ā¢ Assumes examples are given
ā¢ Assume that the agent wants to learn m f (why?)
15. Continueā¦
ā¢ Construct/adjust h to agree with f on training set
ā¢ (h is consistent if it agrees with f on all examples)
ā¢ E.g., curve fitting:
The simplest hypothesis consistent with the data is called Ockhamās razor
17. Continueā¦
ā¢ We first describe the representationā
the hypothesis spaceāand then show
how to learn a good hypothesis.
18. Representation
ā¢ A Decision Tree takes as input an object given
by a set of properties, output a Boolean value
(yes/no decision).
ā¢ Each internal node in the tree corresponds to
test of one of the properties. Branches are
labelled with the possible values of the test.
ā¢ Aim: Learn goal concept (goal predicate)
from examples
ā¢ Learning element: Algorithm that builds up
the decision tree.
ā¢ Performance element: decision procedure
given by the tree
20. Continueā¦
ā¢ A Boolean decision tree is logically equivalent to the assertion that the
goal attribute is true, if and only if the input attributes satisfy one of
the paths leading to a leaf with value true. Writing this out in
propositional logic, we have
Goal ā (Path1 āØ Path2 āØ . . . .)
ā¢ where each Path is a conjunction of attribute-value tests required to
follow that path. Thus, the whole expression is equivalent to
disjunctive normal form which means that any function in
propositional logic can be expressed as a decision tree.
Path = (Patrons =Full ā§ WaitEstimate =0ā10)
21. Example
ā¢ Problem to wait for a table at a restaurant. A decision tree
decides whether to wait or not in a given situation.
ā¢ Attributes:
ā¢ Alternate: alternative restaurant nearby
ā¢ Bar: bar area to wait
ā¢ Fri/Sat: true on Fridays and Saturdays
ā¢ Hungry: whether we are hungry
ā¢ Patrons: how many people in restaurant (none, some, or full)
ā¢ price: price range (Ā£ , Ā£ Ā£ , Ā£ Ā£ Ā£ )
22. Continueā¦
ā¢ raining: raining outside
ā¢ reservation: whether we made a reservation
ā¢ type: kind of restaurant (French, Italian, Thai, or Burger)
ā¢ WaitEstimate: estimated wait (<10, 10-30,30-60,>60)
23.
24.
25.
26.
27. How to pick nodes?
ā¢ For a training set containing p positive examples and n negative
examples, we have:
H
š
š+š
,
š
š+š
= ā
š
š+š
š„šØš š
š
š+š
ā
š
š+š
š„šØš š
š
š+š
ā¢ A chosen attribute A, with K distinct values, divides the training set E
into subsets E1, ā¦ , EK.
ā¢ The Expected Entropy (EH) remaining after trying attribute A (with
branches i=1,2,ā¦,K) is
EH(A)= š=š
š š š+š š
š+š
šÆ
š
š+š
,
š
š+š
28. Continueā¦
ā¢ Information gain (I) or reduction in entropy for this attribute is:
š¼ š“ =H
š
š+š
,
š
š+š
-EH(A)
ā¢ Example;
ā¢ I(Patrons)=H
š
šš
,
š
šš
-
2
12
H
š
š
,
š
š
+
4
12
H
š
š
,
š
š
+
6
12
H
š
š
,
š
š
= š. ššššššš
29. How to select next node??
ā¢ Given Patrons as root node, the next attribute chosen is Hungry?,
with IG(Hungry?) = I(1/3, 2/3) ā ( 2/3*1 + 1/3*0) = 0.252
33. Continueā¦
ā¢Ensemble learning is a machine learning
paradigm where multiple learners are trained to
solve the same problem. In contrast to ordinary
machine learning approaches which try to learn
one hypothesis from training data, ensemble
methods try to construct a set of hypotheses and
combine them to use.
34. Continueā¦
ā¢ Ensemble learning helps improve machine learning results by
combining several models.
ā¢ This approach allows the production of better predictive
performance compared to a single model.
ā¢ Ensemble methods are meta-algorithms that combine several machine
learning techniques into one predictive model in order
to decrease variance(bagging), bias (boosting), or improve
predictions (stacking).
35.
36. Boosting
ā¢ Boosting refers to a family of algorithms that are able to convert weak
learners to strong learners.
ā¢ The main principle of boosting is to fit a sequence of weak learnersā
models that are only slightly better than random guessing, such as
small decision treesā to weighted versions of the data.
ā¢ More weight is given to examples that were misclassified by earlier
rounds.
ā¢ The predictions are then combined through a weighted majority vote
(classification) or a weighted sum (regression) to produce the final
prediction.
37. Continueā¦
ā¢ The principal difference between boosting and the committee methods,
such as bagging, is that base learners are trained in sequence on a
weighted version of the data.
ā¢ The algorithm below describes the most widely used form of boosting
algorithm called AdaBoost, which stands for adaptive boosting.
42. Continueā¦
ā¢ Natural Language Processing (NLP) refers to AI method of
communicating with an intelligent systems using a natural language
such as English.
ā¢ Processing of Natural Language is required when you want an
intelligent system like robot to perform as per your instructions, when
you want to hear decision from a dialogue based clinical expert
system, etc.
ā¢ The field of NLP involves making computers to perform useful tasks
with the natural languages humans use. The input and output of an
NLP system can be ā
ā¢ Speech
ā¢ Written Text
43. Continueā¦
ā¢ To process written text, we need:
ā¢ lexical, syntactic, semantic knowledge about the language
ā¢ discourse information, real world knowledge
ā¢ To process spoken language, we need everything required
to process written text, plus the challenges of speech recognition
and speech synthesis.
44. Components of NLP
ā¢Natural Language Understanding (NLU)
ā¢Understanding involves the following tasks ā
ā¢ Mapping the given input in natural language into useful
representations.
ā¢ Analyzing different aspects of the language.
45. Continue...
ā¢Natural Language Generation (NLG)
ā¢ It is the process of producing meaningful phrases and
sentences in the form of natural language from some internal
representation.
ā¢ It involves ā
ā¢ Text planning ā It includes retrieving the relevant content from
knowledge base.
ā¢ Sentence planning ā It includes choosing required words,
forming meaningful phrases, setting tone of the sentence.
ā¢ Text Realization ā It is mapping sentence plan into sentence
structure.
The NLU is harder than NLG.
46. Difficulties in NLU
ā¢ NL has an extremely rich form and structure.
ā¢ It is very ambiguous. There can be different levels of
ambiguity ā
ā¢ Lexical ambiguity ā It is at very primitive level such as
word-level.
ā¢ For example, treating the word āboardā as noun or verb?
ā¢ Syntax Level ambiguity ā A sentence can be parsed in
different ways.
47. Continueā¦
ā¢ For example, āHe lifted the beetle with red cap.ā ā Did he use cap to
lift the beetle or he lifted a beetle that had red cap?
ā¢ Referential ambiguity ā Referring to something using pronouns. For
example, Rima went to Gauri. She said, āI am tired.ā ā Exactly who is
tired?
ā¢ One input can mean different meanings. Many inputs can mean the
same thing.
48. NLP Terminology
ā¢ Phonology ā It is study of organizing sound systematically.
ā¢ Morphology ā It is a study of construction of words from
primitive meaningful units.
ā¢ Morpheme ā It is primitive unit of meaning in a language.
ā¢ Syntax ā It refers to arranging words to make a sentence. It
also involves determining the structural role of words in the
sentence and in phrases.
49. Continueā¦
ā¢ Semantics ā It is concerned with the meaning of words and how to
combine words into meaningful phrases and sentences.
ā¢ Pragmatics ā It deals with using and understanding sentences in
different situations and how the interpretation of the sentence is
affected.
ā¢ Discourse ā It deals with how the immediately preceding sentence can
affect the interpretation of the next sentence.
ā¢ World Knowledge ā It includes the general knowledge about the
world.
50. Steps in NLP
ā¢There are general five steps ā
ā¢Lexical Analysis
ā¢Syntactic Analysis (Parsing)
ā¢Semantic Analysis
ā¢Discourse Integration
ā¢Pragmatic Analysis
51. Continueā¦
ā¢ Lexical Analysis ā It involves identifying and analyzing the structure
of words. Lexicon of a language means the collection of words and
phrases in a language. Lexical analysis is dividing the whole chunk of
txt into paragraphs, sentences, and words.
ā¢ Syntactic Analysis (Parsing) ā It involves analysis of words in the
sentence for grammar and arranging words in a manner that shows the
relationship among the words. The sentence such as āThe school goes
to boyā is rejected by English syntactic analyzer.
52. Continueā¦
ā¢ Semantic Analysis ā It draws the exact meaning or the dictionary
meaning from the text. The text is checked for meaningfulness. It is
done by mapping syntactic structures and objects in the task domain.
The semantic analyzer disregards sentence such as āhot ice-creamā.
ā¢ Discourse Integration ā The meaning of any sentence depends upon
the meaning of the sentence just before it. In addition, it also brings
about the meaning of immediately succeeding sentence.
ā¢ Pragmatic Analysis ā During this, what was said is re-interpreted on
what it actually meant. It involves deriving those aspects of language
which require real world knowledge.
55. Introduction
ā¢A computer program is said to learn from a
experience E with respect to the some class
of tasks T and performance measure P, if
its performance on tasks in T, on tasks in T
as measured by P improves with experience
E.
DataPrediction
Classification
acting
56. Feed the Experience or Data Problem or Task
Background Knowledge
(Which will help the system)
Solution and
its corresponding performance measure
Learner Reasoner
Models
58. Creating a Learner
Choose
Training
Experience
ā¢ Training Data
Choose Target
Function
ā¢ How to represent a
model (That is to be
learned)
Choose how to
represent a
target function
Choose a
learning
Algorithm
59. Different Types of Learning
Supervised Learning1
Unsupervised Learning2
Semi Supervised Learning3
Reinforcement Learning4
60. Supervised Learning
ā¢ This kind of learning is
possible when inputs and
the outputs are clearly
identified, and algorithms
are trained using labeled
examples.
61. Unsupervised
Learning
ā¢ Unlike supervised learning,
unsupervised learning is used with
data sets without historical data.
An unsupervised learning
algorithm explores surpassed data
to find the structure. This kind of
learning works best for
transactional data; for instance, it
helps in identifying customer
segments and clusters with certain
attributes
62. Semi-Supervised
Learning
ā¢ As the name suggests,
semi-supervised learning is
a bit of both supervised
and unsupervised learning
and uses both labeled and
unlabeled data for
training. In a typical
scenario, the algorithm
would use a small amount
of labeled data with a large
amount of unlabeled data.
63. Reinforcement Learning
ā¢ This is a bit similar to the traditional type of data analysis; the
algorithm discovers through trial and error and decides which
action results in greater rewards. Three major components
can be identified in reinforcement learning functionality: the
agent, the environment, and the actions. The agent is the
learner or decision-maker, the environment includes
everything that the agent interacts with, and the actions are
what the agent can do.
66. Perception
ā¢Perception appears to be an effortless
activity for humans, it requires a significant
amount of sophisticated computation.
ā¢The goal of vision is to extract information
needed for tasks such as manipulation,
navigation, and object recognition.
67. Why image processing???
ā¢It is motivated by two major applications
ā¢Improvement of pictorial information for
human perception.
ā¢Image processing for autonomous machine
applications.
ā¢Efficient storage and transmission.
68. Basic Steps of Image Processing
ā¢ Image Acquisition: An imaging sensor and the capability to
digitalize the signal produced by the sensor.
ā¢ Preprocessing: Enhance the image quality, filtering, contrast
enhancement etc.
ā¢ Segmentation: Partitions an image into constituent parts of
objects.
ā¢ Description/ Feature selection: Extracts description of image
objects suitable for further computer processing.
69. Continueā¦
ā¢Recognition & interpretation: Assigning a label
to the object based on the information provided
by its descriptor. Interpretation assigns meaning
to a set of labeled objects.
ā¢Knowledge Base: KB helps for efficient
processing as well as inter module cooperation.