80 likes | 173 Views
Instance-Based Learners. So far, the learning methods that we have seen all create a model based on a given representation and a training set. Once the model has been created the training set no longer used in classifying unseen instances.
E N D
Instance-Based Learners • So far, the learning methods that we have seen all create a model based on a given representation and a training set. • Once the model has been created the training set no longer used in classifying unseen instances. • Instance-Based Learners are different in that they do not have a training phase. They also do not create a model. • Instead, they use the training set each time an instance must be calculated.
Instance-Based Learners • Although there are a number of types of instance-based approach, two simple (but effective) methods are: • K-Nearest Neighbor • Discrete Target Functions • Continuous Target Functions • Distance Weighted • General Regression Neural Networks
Instance-Based Learners:K-Nearest Neighbor (Discrete) • Given a training set of the form {(t1,d1), (t2,d2), … , (tn,dn)} • Let tq represent an instance to be classified as dq • Let Neighborhood = {(tc[1], dc[1]), (tc[2], dc[2]), … , (tc[k], dc[k])}, represent the set of k training instances closest to instance q. Where c is an array of the indexes of the closest instances to q using a distance function d(q,i), that returns the distance between tq and ti. • Simply set dq = the most common di in Neighborhood.
Instance-Based Learners:K-Nearest Neighbor (Continuous) • Given a training set of the form {(t1,d1), (t2,d2), … , (tn,dn)} • Let tq represent an instance to be classified as dq • Let Neighborhood = {(tc[1], dc[1]), (tc[2], dc[2]), … , (tc[k], dc[k])}, represent the set of k training instances closest to instance q. Where c is an array of the indexes of the closest instances to q using a distance function d(q,i), that returns the distance between tq and ti. • Simply set dq = (Σi dc[i])/k .
Instance-Based Learners:K-Nearest Neighbor (Distance Weighted) • Given a training set of the form {(t1,d1), (t2,d2), … , (tn,dn)} • Let tq represent an instance to be classified as dq • Let Neighborhood = {(tc[1], dc[1]), (tc[2], dc[2]), … , (tc[k], dc[k])}, represent the set of k training instances closest to instance q. Where c is an array of the indexes of the closest instances to q using a distance function d(q,i), that returns the distance between tq and ti. • Let wi = d(q,c[i])-b • Set dq = (Σi=1kwidc[i])/(Σi wi) • k < n (Local Method) • k = n (Global Method [Shepard’s Method])
Instance-Based Methods:General Regression Neural Networks (GRNNs) • GRNNs are global methods that consist of: • A hidden layer of Gaussian neurons (one neuron for each ti) • A set of weights wi, where wi = di • A set of standard deviations, σi for each training instance i • dq= f(tq) = (Σhfi(tq,ti)di) / Σhfi(tq,ti) • hfi(tq,ti) = exp(- (||tq- ti||2)/2σi2)
Instance-Based Learning:General Regression Neural Networks (GRNNs)
Instance-Based Learning:General Regression Neural Networks (GRNNs)