Kernel: R (R-Project)
Lecture 22: Nearest Neighbor Classifier, continued
Today:
Nearest Neighbor Classifier
Assessing a Classifier
Setup and Data Upload
In [2]:
In [3]:
In [4]:
- 683
- 11
ID | Clump.Thickness | Uniformity.of.Cell.Size | Uniformity.of.Cell.Shape | Marginal.Adhesion | Single.Epithelial.Cell.Size | Bare.Nuclei | Bland.Chromatin | Normal.Nucleoli | Mitoses | Class |
---|---|---|---|---|---|---|---|---|---|---|
1000025 | 5 | 1 | 1 | 1 | 2 | 1 | 3 | 1 | 1 | 0 |
1002945 | 5 | 4 | 4 | 5 | 7 | 10 | 3 | 2 | 1 | 0 |
1015425 | 3 | 1 | 1 | 1 | 2 | 2 | 3 | 1 | 1 | 0 |
In [5]:
In [6]:
- 400
- 11
- 283
- 11
k-Nearest Neighbor Classifier: Building the pieces
In [7]:
In [8]:
- Ben
- Chandra
Levels:
- 'Ada'
- 'Ben'
- 'Chandra'
- 'Dante'
In [9]:
- 1
- 1
- 1
- 0
- 0
- 0
In [10]:
3
3
1
k-Nearest Neighbor Classifier: Predicting the labels of each test data
In [11]:
In [0]:
In [0]: