Week 8 • Monday

Block 72: Classification: KNN & Logistic Regression

Train and evaluate two classification algorithms.

Concepts

Code Examples

See exercise below.

Exercise

Compare KNN and Logistic Regression on the Iris dataset. Which is more accurate? Try k=1, 5, 15 for KNN. Plot accuracy vs k.

Homework

What is the bias-variance trade-off? How does k in KNN relate to it? Tuesday