Skip to Content
Machine Learning with R, the tidyverse, and mlr
book

Machine Learning with R, the tidyverse, and mlr

by Hefin Rhys
April 2020
Intermediate to advanced
536 pages
16h 55m
English
Manning Publications
Content preview from Machine Learning with R, the tidyverse, and mlr

Chapter 3. Classifying based on similarities with k-nearest neighbors

This chapter covers

  • Understanding the bias-variance trade-off
  • Underfitting vs. overfitting
  • Using cross-validation to assess model performance
  • Building a k-nearest neighbors classifier
  • Tuning hyperparameters

This is probably the most important chapter of the entire book. In it, I’m going to show you how the k-nearest neighbors (kNN) algorithm works, and we’re going to use it to classify potential diabetes patients. In addition, I’m going to use the kNN algorithm to teach you some essential concepts in machine learning that we will rely on for the rest of the book.

By the end of this chapter, not only will you understand and be able to use the kNN algorithm to make classification ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Advanced Machine Learning with R

Advanced Machine Learning with R

Cory Lesmeister, Dr. Sunil Kumar Chinnamgari
R Machine Learning Projects

R Machine Learning Projects

Dr. Sunil Kumar Chinnamgari

Publisher Resources

ISBN: 9781617296574Publisher SupportOtherPublisher WebsiteSupplemental ContentErrata PagePurchase Link