









Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
This page cannot be seen from the preview
Don't miss anything!










Greg Hamerly
Spring 2008
Some content from Tom Mitchell.
Outline
1 Locally weighted regression
2 Radial basis functions
3 Learning linear functions
4 Case-based reasoning
5 Lazy and eager learning
Locally weighted regression
Several options of error functions: Squared error over k nearest neighbors (in N(xq , k))
E 1 (xq ) ≡
x∈N(xq ,k)
(f (x) − ˆf (x))^2
Distance-weighted squared error over all neighbors
E 2 (xq ) ≡
x∈D
(f (x) − ˆf (x))^2 K (d(xq , x))
Combination of the two (kernel-weighted over k neighbors)
Radial basis functions
Global approximation to target function, in terms of linear combination of local approximations Used, e.g., for image classification A different kind of neural network Closely related to distance-weighted regression, but “eager” instead of “lazy”
Radial basis functions
Q1: What xu to use for each kernel function Ku (d(xu , x)) Scatter uniformly throughout instance space Or use training instances (reflects instance distribution) Or use the means of clusters (found by k-means, Gaussian EM, etc.)
Q2: How to train weights (assume here Gaussian Ku ) First choose variance (and perhaps mean) for each Ku e.g., use EM Then hold Ku fixed, and train linear output layer efficient methods to fit linear function
Learning linear functions
Consider a linear function of x, where x 0 = 1:
f (x) = w 0 x 0 + w 1 x 1 + w 2 x 2 +... + wd xd
Mitchell has discussed several methods for learning the weights of a linear function based on gradient descent.
However, if we assume a squared error function:
E (ˆf ) =
∑^ n
i=
(f (xi ) − ˆf (xi ))^2
then much more efficient training methods exist.
Learning linear functions
Take the derivative of E with respect to the weights:
E (ˆf ) =
(Xw − y )T^ (Xw − y ) ∂E ∂w = (X T^ )(Xw − y ) = X T^ Xw − X T^ y Setting this equal to zero to find the minimum value: X T^ Xw − X T^ y = 0 X T^ Xw = X T^ y (X T^ X )−^1 X T^ Xw = (X T^ X )−^1 X T^ y w ˆ = (X T^ X )−^1 X T^ y Easily computed in any numerical package (e.g. Matlab), with the majority of the cost being a (d + 1) × (d + 1) matrix inversion. (^) 10 / 16
Learning linear functions
Linear models are extremely popular because: they can be solved efficiently (see previous slides) represent more complex functions through ‘basis expansions’ construct a linear combination of nonlinear features
Many machine learning algorithms are related to some sort of linear model: linear output perceptron (without thresholding) radial basis network locally weighted regression non-linear (e.g. polynomial) regression support vector machines etc.
Case-based reasoning
CADET: 75 stored examples of mechanical devices each training example: 〈 qualitative function, mechanical structure〉 new query: desired function, target value: mechanical structure for this function Distance metric: match qualitative function descriptions
Case-based reasoning
A stored case:
_+
+_
Function:
T−junction pipe
T Q
= temperature = waterflow
Structure:
_+
+_
+^ −
Structure: Function:
A problem specification: (^) Water faucet
Q ,T 1
2
1
Q ,T Q ,T 2
3 3
Q Q T T
Q
T
1 2 1 2 3
3
C C
t f
Q
T
c
c
Q
T
h
h
Q
T
m
m
Lazy and eager learning
Lazy: wait for query before generalizing k-Nearest Neighbor, Case based reasoning
Eager: generalize before seeing query Radial basis function networks, ID3, Backpropagation, NaiveBayes,... Does it matter? Eager learner must create global approximation Lazy learner can create many local approximations if they use same H, lazy can represent more complex functions (e.g., consider H = linear functions)