Chapter 4: Machine Learning
Chapter 4: Machine Learning
Machine Learning
Can Machine Learns?
Learning? ~ to improve automatically with experience.
We do not yet know how to make computers learn nearly
as well as people learn ~ machine and human is two
different things .
“concept” ~ human learns from their experience (trial by
error, or being guided – like an infant/student).
Example: baby attempts to walk after fall down several
times. Pain or how to balance are the best guidance.
Problem ~ how machine can learn these? Do we need
to put sensory devices to detect pain? ~ how to
represent pain? ~ as “electronic pulse” of pain?
Machine Learning
Machine learning ~ draws on concepts from statistics,
artificial intelligence, philosophy, information theory,
biology, cognitive science, computational complexity and
control theory (many more!).
How machine learn? : a computer is said to learn from
experience E with respect of tasks T and performance
measures P. (if its P at tasks in T (measured by P)
improves with experience E)
Need to have well-defined learning problem (based on
three features: (class of tasks, measure of performance
and source of experience)
Well-Posed Learning Problems
A checkers learning problems:
Task T: playing checkers
Performance measure P: percent of games won
against opponents.
Training experience E: playing practice games against
itself.
A handwriting recognition problems:
Task T: recognizing & classifying handwritten words
images.
Performance measure P: percent of words correctly
classified.
Training experience E: database of handwritten words.
General Machine Learning
Model
Training
experience
Database
(experience) Machine learning Adjust learning
algorithm parameter (based
on performance
results)
<New problem>
Performance?
Designing a Learning System
• Basic four steps to design learning system:
Height
Height > 2.0m
<1.3m >1.8m <1.5m
Tall
Short Tall Short
Medium
Medium
LEAF NODE
Example: Decision Tree Learning
SINGLE, MARRIED
DIVORCED
NO
TAX
<80 > 80
NO YES
Why Decision Tree ?
•Advantages:
•Easy to use and efficient.
•Tree structures are easy to interpret and understand.
•Direct representation.
•Disadvantages
•Do not easily handle continuous data.
•Difficult to handle missing data.
•Correlation between attributes are ignored by decision
tree process.
•Tree might replicate
2) Instance Based Learning
•Instance based learning ~ straight forward approaches to
approximating target value
•Basic: when a new query instance is encountered, a set of
similar related instances is retrieved from memory and used
to classify new instances.
•Sometimes referred as “lazy learner” ~ learning process
takes place when new instance must be classified.
•Main concept ~ the nearest existing example that might
similar to the new one!
•Common method ~ K-Nearest Neighbor and Case Based
Reasoning.
K-Nearest Neighbor
•Named as “lazy learner” method requires comparison
with training set . Primarily based on “nearest” distance.
n
Manhattan Distance M d xi yi
i 1
n
Minkowski’s Distance Minkd x y
2
q
i i
i 1
K-Nearest Neighbor (cont)
Attributes X1 X2 X3 CLASS
A 5 1 3 GOOD
B 3 1 3 GOOD
C 4 1 5 BAD
Solved
Tested, Repaired Case
Case (2)REUSE
Confirmed Suggested
solution (3) REVISE solution
Case Based Reasoning (cont)
CASE F12:
Leaf color green
Stalk color green.
Spot yes. NEW CASE:
Spot condition stripes Leaf color green
Panicle yes Stalk color green.
Disease : Bacterial Leaf Spot no.
Streak. Spot condition stripes
Panicle yes
Disease : ?
CASE B3:
Leaf color yellowish
Stalk color green. Compare
Possibly Bacterial
Spot no. similarities
Leaf Streak disease
Spot condition no. (local)
Panicle no
(New case is almost
Disease : Bakanae similar to case F12).
Case Based Reasoning (cont)
•Advantages:
•Easy to represent (by cases representation)
•Incremental learning (reused, retained and
adaptation process).
•Capable to handle missing value.
•Disadvantages:
•Exhaustive learning (more dataset, more memory)
•Cases should be updated regularly.
•Complexity of the cases sometimes hard to be
represented.
3) Supervised Learning
Supervised Learning
Essential ingredient: availability the external
indicator (“teacher”). teacher provides desired or
target response for particular training vector.
Environment Teacher
Error signal
Supervised Learning
Example: Multilayer Perceptron Neural Networks
•Inspired by observation that biological learning systems
are built from very complex interconnected neurons.
•Learning algorithm: error-correction learning (error-
signal). dk(n) is a desired response and yk(n) is a actual
response.
ek (n) d k (n) yk (n)
weights
hidden
node
3) Unsupervised Learning
Unsupervised Learning
Essential ingredient: no external “teacher” to
oversee the learning process. (no specific examples
of the function to be learned by the network).
•A sequence of input vector is provided, but NO target
vector.
•Basically, the similar group of data will be clustered
together (self organized learning) – “winner takes all”
strategies. ~ clustering.
•Example: Kohonen Self Organizing Map (SOM),
Adaptive Resonance Theory ~ ART)
Unsupervised Learning
Example: Kohonen Self Organizing Map
•Also known as “topology preserving map”
•The weight vector for a cluster unit serves as an
exemplar of the input patterns associated with that
cluster.
•Basically ~ the cluster unit whose weight vector matches
the input pattern most closely is chosen as a winner.
•Euclidean distance ~ minimum distance is considered
winner.
n
Ed xi yi
2
i 1
Kohonen SOM
Output (cluster)
{Output layer}
weights
{input layer}
Input nodes
4) Reinforcement Learning
Reinforcement Learning
•Addresses to question of how an autonomous agent that
senses and acts in its environment can learn to choose
optimal action(s) to achieve its goal(s).
•Concept ~ each time the agent performs an action in its
environment, reward or penalty will be given (based on
desirability of result state).
•Task ~ the agent must know which action gain most
reward (reinforcement signal) ~ strengthened signal or
reward indicates satisfactory actions.
•Learning algorithm: using Q learning, adaptive heuristic
critic and temporal-difference methods.
Reinforcement Learning
Agent : Reinforcement Learning
Agent
Environment
a0 a1 a2
S0 S1 S2
r0 r1 r2