Course 395: Machine Learning - Lectures: - Lecture 7-8: Instance Based Learning (M. Pantic)
Course 395: Machine Learning - Lectures: - Lecture 7-8: Instance Based Learning (M. Pantic)
Course 395: Machine Learning - Lectures: - Lecture 7-8: Instance Based Learning (M. Pantic)
• Lecture 7-8: Instance Based Learning (M. Pantic)
• Lazy learning
• Eager learning methods construct general, explicit description of the target function
based on the provided training examples.
• Eager learning methods construct general, explicit description of the target function
based on the provided training examples.
• Lazy learning methods simply store the data and generalizing beyond these data is
postponed until an explicit request is made.
Problem Solution
space space
• Eager learning methods construct general, explicit description of the target function
based on the provided training examples.
• Lazy learning methods simply store the data and generalizing beyond these data is
postponed until an explicit request is made.
Problem Solution
space space
• Eager learning methods construct general, explicit description of the target function
based on the provided training examples.
• Lazy learning methods simply store the data and generalizing beyond these data is
postponed until an explicit request is made.
Problem Solution
space space
• Eager learning methods construct general, explicit description of the target function
based on the provided training examples.
• Lazy learning methods simply store the data and generalizing beyond these data is
postponed until an explicit request is made.
Problem Solution
space space
• Eager learning methods construct general, explicit description of the target function
based on the provided training examples.
• Lazy learning methods simply store the data and generalizing beyond these data is
postponed until an explicit request is made.
Problem Solution
space space
• Eager learning methods construct general, explicit description of the target function
based on the provided training examples.
• Lazy learning methods simply store the data and generalizing beyond these data is
postponed until an explicit request is made.
• Lazy learning methods can construct a different approximation to the target function
for each encountered query instance.
• Eager learning methods use the same approximation to the target function, which
must be learned based on training examples and before input queries are observed.
• Eager learning methods construct general, explicit description of the target function
based on the provided training examples.
• Lazy learning methods simply store the data and generalizing beyond these data is
postponed until an explicit request is made.
• Lazy learning methods can construct a different approximation to the target function
for each encountered query instance.
• Eager learning methods use the same approximation to the target function, which
must be learned based on training examples and before input queries are observed.
• Lazy learning is very suitable for complex and incomplete problem domains, where a
complex target function can be represented by a collection of less complex local
approximations.
• Given the target function V: X → C and a set of n already observed instances (xi, cj),
where xi ∈ X, i = [1..n], cj ∈ C, j = [1..m], V(xi) = cj, k-NN algorithm will decide the
class of the new query instance xq based on its k nearest neighbours (previously
observed instances) xr, r = [1..k], in the following way:
V(xq) ← cl ∈ C ↔ (∀ j ≠ l) ∑r E(cl, V(xr)) > ∑r E(cj, V(xr)) where
E(a, b) = 1 if a = b and E(a, b) = 0 if a ≠ b
• The nearest neighbours of a query instance xq are usually defined in terms of standard
Euclidean distance:
where the instances xi, xq ∈ X are described with a set of g = [1..p] arguments ag
• Disadvantage – All k-NN algorithms calculate the distance between instances based
on all attributes → if there are many irrelevant attributes, instances that belong
together may still be distant from one another.
• Remedy – weight each attribute differently when calculating the distance between two
instances
• Lazy learning
• Case-based reasoning (CBR)
• Human knowledge about the world is organized in memory packets holding similar
concepts and/or episodes that one experienced.
• If a memory packet contains a situation when a problem was successfully solved and
the person experiences a similar situation, the previous experience is recollected and
the same steps are followed to reach a solution.
• Rather than following a general set of ruls, reapplying previously successful solution
schemes in a new but similar context solves the newly encountered problems.
• Human knowledge about the world is organized in memory packets holding similar
concepts and/or episodes that one experienced.
• If a memory packet contains a situation when a problem was successfully solved and
the person experiences a similar situation, the previous experience is recollected and
the same steps are followed to reach a solution.
• Rather than following a general set of ruls, reapplying previously successful solution
schemes in a new but similar context solves the newly encountered problems.
• Lazy learning is much closer to human reasoning model than this is the case with
eager learning
– If problems occur to which no specific case can match exactly, reason from more
general similarities to come up with solutions. 1-NN, otherwise k-NN
Note: the retrieval is almost never full breadth (exhaustive).
distance
measure – The basis of memory-based model is automatic (online) learning:
Memory of experiences is augmented by each novel experience (case).
I.e., the process of learning never ceases.
Problem Solution
space space
Problem Solution
space space
Problem Solution
space space
Problem Solution
space space
Problem Solution
space space
case base
• How the indexing (assigning indexes to cases to facilitate their retrieval) should be
defined?
• Case indexing: assigning indexes to cases to facilitate efficient and accurate retrieval
of cases from the case base.
• Retrieval algorithm should retrieve case(s) most similar to the currently presented
problem / situation.
preferred as it results in faster
• 1-NN (k-NN) search retrieval and more accurate solutions
A case-by-case search. Search is accurate but highly time consuming.
• Good retrieval algorithm: the best compromise between accuracy and efficiency.
• Structural Adaptation
Applies a set of adaptation rules directly to the retrieved solutions.
Adaptation rules can include, e.g., modifying certain attributes through
interpolating between relevant attributes of the retrieved cases.
• Derivational Adaptation
Uses algorithms / rules that have been used to generate the original solution.
Can be used only for problem domains that are completely transparent.
↔ Not used very often.
• Suitability for complex and incomplete problem domains: A complex target function
can be described as a collection of less complex local approximations and unknown
classes can be learned.
• Handling very large problem domains: This implies high memory / storage
requirements and time-consuming search for similar examples.
• Handling overly noisy data: Such data may result in storing same problems numerous
times because of the differences in cases due to noise. In turn, this implies high
memory / storage requirements and time-consuming search for similar examples.
• Achieving fully automatic operation: Only for complete problem domains a fully
automatic operation of a lazy learner can be expected. Otherwise, user feedback is
needed for situations for which the learner has no solution.
• Lazy learning
• (Example: CBR-based system for facial expression interpretation)
Happy
AU6+AU12+AU25 = Happy
Maja Pantic Machine Learning (course 395)
Case Base Initialisation
Clusters:
label ‹angry›
cases ‹(2,4,0); (4,0); (7,0);…;
(24,0); (24,17,0)›
index ‹4, 7, 24,…›
• Lecture 9-10: Genetic Algorithms (M. Pantic)