1. CS 9633 Machine Learning k-nearest neighbor Chapter 8: Instance-based learning Adapted from notes by Tom Mitchell http://www-2.cs.cmu.edu/~tom/mlbook-chapter-slides.html
2.
3.
4.
5.
6.
7.
8. Discrete Valued Target Function Training algorithm: For each training example <x, f(x), add the example to the list training_examples Classification algorithm: Given a query instance x q to be classified Let x 1 …x k be the k training examples nearest to x q Return
9.
10. Training dataset Poor Married Medium Very High Jack Good Married Very High Very Low Igor Doubtful Married Medium Low Harry Doubtful Unmarried High Low George Poor Married Very low High Fred Poor Married Low High Ellen Poor Married Low Very high Dale Poor Unmarried Very low Medium Candy Doubtful Married High Low Ben Good Married High High Abel Risk Marital Status Income Debt Customer ID
11.
12. Test Set ? Unmarried High Low Steve ? Married Very low Very low Trey ? Divorced Low High Unace ? Married Low High Vasco ? Unmarried Very low Very low Xu ? Married High Low Yong ? Married Medium High Zeb Risk Marital Status Income Debt Customer ID