From the course: Supervised Learning Essential Training
Unlock the full course today
Join today to access over 22,600 courses taught by industry experts or purchase this course individually.
Deciphering KNN model metrics - Python Tutorial
From the course: Supervised Learning Essential Training
Deciphering KNN model metrics
- [Instructor] There are a couple different performance metrics we can use to evaluate our KNN models. We can compare our models' accuracy, precision, recall, and F1 score. To briefly go over classification metrics, accuracy is the ratio of correctly classified points to the total number of points in data. You'll typically see accuracy as a percentage, and that's converted just by multiplying our model out, but by 100. Precision is the accuracy of positive predictions only. So how many of the predicted positive points were actually positive? Recall, or true positive rate, is the ratio of positive points that are correctly predicted by our model. We can think of recall as how many positive points the model was able to recall as positive. F1 score is the harmonic mean of precision and recall and therefore balances the two metrics. The simple mean will treat all values equally, but the harmonic mean gives more weight to low…
Practice while you learn with exercise files
Download the files the instructor uses to teach the course. Follow along and learn by watching, listening and practicing.