Classification: K-Nearest Neighbors
3/27/17
Classification: K-Nearest Neighbors 3/27/17 Recall: Machine - - PowerPoint PPT Presentation
Classification: K-Nearest Neighbors 3/27/17 Recall: Machine Learning Taxonomy Supervised Learning For each input, we know the right output. Regression Outputs are continuous. Classification Outputs come from a (relatively
3/27/17
Supervised Learning
Unsupervised Learning
Semi-Supervised Learning
Labeling the city an apartment is in. Labeling hand-written digits.
can learn.
learning algorithm.
from input to output.
Training:
localized lookup.
Prediction:
achieved.)
(and possible answers)
neighbor contributes votes for its label.
Idea: if we’re weighting by distance, we can give all training points a vote.
weight. Why might this be a bad idea?
training set.
quickly and sum over a small set.
each test point).
vs.
each test point).
vote, average the y-values.
nearest neighbors.
by distance.
Least squares linear regression solves the following problem:
dimension to minimize squared error: Instead, we can minimize the distance-weighted squared error:
the space of possible inputs; store splits in a tree.
splits until a leaf (with a label) is reached.
Who plays tennis when it’s raining but not when it’s humid?
Greedy algorithm:
sub-regions.
trees for the sub-regions.
elevation $ / sq. ft.
Does this give us an
Considerations:
mappings