0% found this document useful (0 votes)
25 views12 pages

Instanced Based Learning Overview

Instance-Based Learning (IBL) methods store training data and classify new instances by retrieving similar instances from memory, allowing for local approximations of target functions. While IBL is advantageous for complex problems, it faces challenges such as high classification costs and sensitivity to the curse of dimensionality. Techniques like k-Nearest Neighbour (k-NN) and Case-Based Reasoning (CBR) exemplify IBL approaches, with variations like Locally Weighted Regression and Radial Basis Function (RBF) enhancing their capabilities.

Uploaded by

cisay22631
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
25 views12 pages

Instanced Based Learning Overview

Instance-Based Learning (IBL) methods store training data and classify new instances by retrieving similar instances from memory, allowing for local approximations of target functions. While IBL is advantageous for complex problems, it faces challenges such as high classification costs and sensitivity to the curse of dimensionality. Techniques like k-Nearest Neighbour (k-NN) and Case-Based Reasoning (CBR) exemplify IBL approaches, with variations like Locally Weighted Regression and Radial Basis Function (RBF) enhancing their capabilities.

Uploaded by

cisay22631
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPT, PDF, TXT or read online on Scribd

UNIT-III

Instanced Based Learning

1
General Description
 IBL methods learn by simply storing the presented training
data.
 When a new query instance is encountered, a set of similar
related instances is retrieved from memory and used to classify
the new query instance.
 IBL approaches can construct a different approximation to the
target function for each distinct query. They can construct local
rather than global approximations.
 IBL methods can use complex symbolic representations for
instances. This is called Case-Based Reasoning (CBR).

2
Advantages and Disadvantages
of IBL Methods
Advantage: IBL Methods are particularly well suited to
problems in which the target function is very complex,
but can still be described by a collection of less
complex local approximations.
Disadvantage I: The cost of classifying new instances
can be high (since most of the computation takes place
at this stage).
Disadvantage II: Many IBL approaches typically
consider all attributes of the instances ==> they are
very sensitive to the curse of dimensionality!
3
k-Nearest Neighbour Learning
 Assumption: All instances, x, correspond to points in the n-dimensional
space Rn. x =<a1(x), a2(x)…an(x)>.
 Measure Used: Euclidean Distance: d(xi,xj)= r=1n (ar(xi)-
ar(xj))2
 Training Algorithm:

For each training example <x,f(x)>, add the example to the list
training_examples.
 Classification Algorithm: Given a query instance xq to be classified:
• Let x1…xk be the k instances from training_examples that are nearest to
xq.
• Return f^(xq) <- argmaxvVr=1n (v,f(xi))
• where (a,b)=1 if a=b and (a,b)=0 otherwise.

4
Example

+ -
- +
-

: query, xq Decision Surface


1-NN: + for 1-NN
5-NN: -
5
Distance-Weighted Nearest
Neighbour
k-NN can be refined by weighing the contribution
of the k neighbours according to their distance to
the query point xq, giving greater weight to closer
neighbours.
To do so, replace the last line of the algorithm with
f^(xq) <- argmaxvVr=1n wi(v,f(xi))
where wi=1/d(xq,xi)2

6
Remarks on k-NN
k-NN can be used for regression instead of
classification.
k-NN is robust to noise and, it is generally quite a good
classifier.
k-NN’s disadvantage is that it uses all attributes to
classify instances

Solution 1: weigh the attributes differently (use cross-
validation to determine the weights)

Solution 2: eliminate the least relevant attributes (again, use
cross-validation to determine which attributes to eliminate)

7
Locally Weighted Regression
Locally weighted regression generalizes
nearest-neighbour approaches by
constructing an explicit approximation to f
over a local region surrounding x q.
In such approaches, the contribution of each
training example is weighted by its distance
to the query point.

8
An Example: Locally Weighted
Linear Regression
 f is approximated by: f^(x)=w0+w1a1(x)+…+wnan(x)
 Gradient descent can be used to find the coefficients w0, w1,…
wn that minimize some error function.
 The error function, however, should be different from the one
used in the Neural Net since we want a local solution.
Different possibilities:

Minimize the squared error over just the k nearest neighbours.

Minimize the squared error over the entire training set but
weigh the contribution of each example by some decreasing
function K of its distance from xq.

Combine 1 and 2

9
Radial

Basis Function (RBF)
Approximating Function:
f^(x)=w0+ u=1k wu Ku(d(xu,x))
 Ku(d(xu,x)) is a kernel function that decreases as the distance d(xu,x)
increases (e.g., the Gaussian function); and k is a user-defined constant
that specifies the number of kernel functions to be included.
 Although f^(x) is a global approximation to f(x) the contribution of each
kernel function is localized.
 RBF can be implemented in a neural network. It is a very efficient two
step algorithm:
• Find the parameters of the kernel functions (e.g., use the EM
algorithm)
• Learn the linear weights of the kernel functions.

10
Case-Based Reasoning (CBR)
 CBR is similar to k-NN methods in that:

They are lazy learning methods in that they defer generalization
until a query comes around.

They classify new query instances by analyzing similar instances
while ignoring instances that are very different from the query.
 However, CBR is different from k-NN methods in that:

They do not represent instances as real-valued points, but instead,
they use a rich symbolic representation.
 CBR can thus be applied to complex conceptual problems such as
the design of mechanical devices or legal reasoning

11
Lazy versus Eager Learning
 Lazy methods: k-NN, locally weighted regression, CBR
 Eager methods: RBF + all the methods we studied in the course so
far.
 Differences in Computation Time:

Lazy methods learn quickly but classify slowly

Eager methods learn slowly but classify quickly
 Differences in Classification Approaches:

Lazy methods search a larger hypothesis space than eager methods
because they use many different local functions to form their
implicit global approximation to the target function. Eager methods
commit at training time to a single global approximation.

12

Common questions

Powered by AI

Locally weighted regression constructs local approximations to the target function by explicitly modeling the function over a local region around the query point. It weights the contribution of nearby points, often using gradient descent to find coefficients that minimize a weighted error function . On the other hand, radial basis function (RBF) networks create global approximations by deploying localized kernel functions, such as Gaussian functions, whose influence diminishes with distance from the query point. RBFs use a two-step approach involving learning kernel parameters and optimizing linear weights, thus blending local specificity with global scope . Both methods aim to leverage locality for improved approximation but differ in their foundational architectures and computational methodologies.

Lazy learning methods, such as k-NN, locally weighted regression, and CBR, differ from eager learning methods in that they delay generalization until new data needs classification. This allows lazy learners to explore a larger hypothesis space since they consider many local approximations. Consequently, lazy methods generally have fast learning times but slow classification stages, as the bulk of computation is deferred to the query phase . In contrast, eager learning methods, like radial basis function networks, commit to a single global approximation during training, leading to slower learning times but faster classification as the model does not change with new queries, operating within a more confined hypothesis space .

k-NN considers all attributes equally while classifying instances, making it sensitive to irrelevant attributes and noise. This often results in diminished performance in such contexts . To address this, one improvement approach is to weigh the attributes differently, using cross-validation to identify optimal weights that reflect attribute importance . Another method involves eliminating the least relevant attributes, again employing cross-validation to determine which attributes can be excluded, thereby reducing sensitivity to noise and improving classification efficiency .

Euclidean distance is the standard metric used in k-NN to measure the similarity between instances, defined as the square root of the sum of squared attribute differences . It is crucial in determining the 'nearness' of training examples to a query point, impacting the selection of neighbors that influence classification outcomes. Using alternative distance metrics, such as Manhattan or Mahalanobis distance, can significantly affect k-NN performance, particularly in handling differently scaled features or correlated attributes. These alternative metrics can provide more robust solutions in certain contexts, especially when Euclidean distance might be sensitive to outliers or irrelevant features .

Kernel functions in Radial Basis Function (RBF) networks help create localized areas of influence that approximate the target function efficiently across input space. These functions, such as Gaussian kernels, diminish in influence with increasing distance, allowing RBF networks to balance between localized specificity and global coverage . The Expectation-Maximization (EM) algorithm plays a key role by determining optimal parameters for these kernels, making the initialization of the network more efficient and ensuring that the network aligns well with the data's intrinsic structures. This results in a more effective and precise global approximation, enhancing RBF network efficiency .

Lazy learning, demonstrated by methods such as Case-Based Reasoning (CBR) and k-NN, significantly affects learning efficiency and decision speed in machine learning systems by delaying computation until a query is made. This approach streamlines the initial learning phase, making it very fast, and requires minimal storage of training instances . However, it often results in slower decision-making since the search and comparison processes occur at query time, leading to increased response times as the system evaluates the relevant data subset then. Consequently, while lazy learning offers flexibility and adaptability, it can suffer from scalability issues and become resource-intensive during classification, particularly with large datasets .

Distance-weighted k-NN improves upon the standard k-NN by assigning greater influence to closer neighbors during classification. This is achieved by modifying the algorithm to weigh the contribution of each neighbor based on its inverse squared distance to the query point, thereby producing a more nuanced and accurate classification . This enhancement allows for smoother decision boundaries and potentially better handling of overlapping classes. However, this weighting comes with additional computational costs as it requires calculating and processing individual distances for each neighbor, which can increase the overall time complexity of the classification phase .

IBL methods excel in problems where the target function, despite its complexity, can be described through a collection of less complex local approximations . This allows IBL to effectively construct different approximations for each distinct query, achieving flexibility and precision in handling complex functions. However, these advantages come at a cost: classifying new instances is computationally intensive as most of the computation is deferred to the classification stage, resulting in high resource consumption during this phase . Furthermore, due to their reliance on all instance attributes, IBL methods are highly susceptible to the curse of dimensionality, which can significantly impair their performance in high-dimensional spaces .

Locally weighted linear regression (LWLR) uses gradient descent to determine coefficients for the best fit line that minimizes an error function focused on local data points. By primarily weighting instances close to the query, LWLR achieves accurate local approximations of the target function . This localized focus allows LWLR to cater to non-linear data patterns within a limited region. However, challenges include choosing appropriate weighting functions and handling the potential increase in computational expense due to frequent adjustments to the model every time a new query is processed. Additionally, determining the size of the local region and appropriate hyperparameter tuning are critical to avoiding overfitting or poor generalizations .

The primary philosophical difference between CBR and k-NN lies in their model representations. CBR employs a rich symbolic representation for instances, which allows it to handle complex, conceptual problems such as mechanical design and legal reasoning . This symbolic nature contrasts with the real-valued point representation used by k-NN. As a result, CBR is inherently more suitable for domains requiring complex relational understanding and conceptual reasoning, while k-NN is limited to data that can be quantitatively measured and compared through distance metrics . This distinction significantly affects their applicability, with CBR being more versatile in symbolic domains and k-NN being preferable for numeric data analysis.

You might also like