Kernel: R (R-Project)
Lecture 21: Classification
Today:
Basic Classifier
Nearest Neighbor Classifier
Assessing a Classifier
Setup and Data Upload
In [87]:
In [88]:
In [90]:
- 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 [91]:
In [94]:
- 400
- 11
- 283
- 11
Exploration and A Simple Classifier (continued from Lecture 20)
In [96]:
Observation:
If Clump.Thickness < 7 AND Uniformity.of.Cell.Size < 3.75, then the label should be 0 (not cancer)
Otherwise, label should be 1 (cancer)
In [97]:
In [98]:
1
In [106]:
1
In [103]:
1
In [110]:
283
In [107]:
In [112]:
0.978798586572438
In [0]:
In [0]:
In [0]:
In [0]:
In [0]:
In [0]: