From the course: Data Science Foundations: Data Mining in Python
Unlock this course with a free trial
Join today to access over 25,500 courses taught by industry experts.
Challenge: KNN - Python Tutorial
From the course: Data Science Foundations: Data Mining in Python
Challenge: KNN
(bright music) - [Instructor] Keeping spam emails out of your inbox is helpful and I'm grateful for it, but when it comes to data mining and machine learning, some tasks are life and death, and in this challenge, I want to invite you to apply one of these approaches, the k-NN, k-Nearest Neighbors algorithm, to a dataset about breast cancer. To do this, I'd like you to import and prepare the breast cancer training and testing dataset, prepare the data, train and optimize the model, plot of the accuracy of the parameters, apply the k-NN model to the training data, graph the confusion matrix, and get the overall accuracy of the model on the testing data. This is following the example we had in the k-NN presentation. Now I want to show you a little bit about the dataset. So I'm going start by importing some libraries. Then I'm going to import the data. This is another dataset from the University of California Irvine…
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.