Eric

“I originally tried DataCamp and a machine learning course on Coursera. But I wanted something more practical, that worked with real data sets using Python and R. Dataquest is a great value, given the interesting data sets. It made sense — invest in your education and get a higher-paying job.”

Eric Sales De Andrade

Lead Backend Engineer @Stealth Startup

Course overview

In this course, you’ll learn how to develop a machine learning workflow for classification tasks using scikit-learn. You’ll learn how to build and implement the k-nearest neighbors algorithm using pandas and scikit-learn. Finally, you’ll learn to train, validate, and improve your machine learning model for better performance and accuracy using techniques like tuning hyperparameters.

Best of all, you’ll learn by doing — you’ll practice and get feedback directly in the browser. At the end of the course, you’ll combine your new skills to complete a project to predict heart disease.

Key skills

  • Establishing a machine learning workflow
  • Implementing the k-nearest neighbors algorithm for a classification task using pandas
  • Implementing the k-nearest neighbors algorithm using scikit-learn
  • Improving model performance using hyperparameters

Course outline

Introduction to Supervised Machine Learning in Python [5 lessons]

The Machine Learning Workflow 2h

Lesson Objectives
  • Define machine learning and supervised machine learning
  • Establish a machine learning workflow
  • Define classification and different types of classification tasks
  • Build a linear SVM classifier (LinearSVC) using scikit-learn
  • Compare the balance between applying an ML model with and without understanding the algorithm

Introduction to K-Nearest Neighbors 2h

Lesson Objectives
  • Explain how the K-Nearest Neighbors algorithm works for classification tasks
  • Define the role of distance metrics for the K-Nearest Neighbors algorithm
  • Implement the K-Nearest Neighbors algorithm for one feature using pandas
  • Implement the K-Nearest Neighbors algorithm for multiple features using pandas
  • Engineer new features to improve model performance
  • Evaluate the model using accuracy as the metric

Evaluating Model Performance 2h

Lesson Objectives
  • Implement the K-Nearest Neighbors algorithm using scikit-learn
  • Apply train/test validation
  • Explain why validation is important for training models
  • Interpret underfitting and overfitting
  • Improve the model’s accuracy

Hyperparameter Optimization 2h

Lesson Objectives
  • Define a hyperparameter
  • Identify how tuning hyperparameters impacts model performance
  • Find optimal hyperparameter value by applying the grid search technique using scikit-learn

Guided Project: Predicting Heart Disease 2h

Lesson Objectives
  • Conduct exploratory data analysis on the dataset
  • Clean and prepare the dataset for training a k-NN model
  • Identify features of interest for training the model
  • Build and train a classifier using selected features
  • Find optimal hyperparameter values using grid search
  • Evaluate the model's performance on the test set

Projects in this course

Guided Project: Predicting Heart Disease

Build a K Nearest Neighbors classifier to predict whether patients might be at risk of heart disease.

The Dataquest guarantee

Guarantee

Dataquest has helped thousands of people start new careers in data. If you put in the work and follow our path, you’ll master data skills and grow your career.

Money

We believe so strongly in our paths that we offer a full satisfaction guarantee. If you complete a career path on Dataquest and aren’t satisfied with your outcome, we’ll give you a refund.

Master skills faster with Dataquest

Go from zero to job-ready

Go from zero to job-ready

Learn exactly what you need to achieve your goal. Don’t waste time on unrelated lessons.

Build your project portfolio

Build your project portfolio

Build confidence with our in-depth projects, and show off your data skills.

Challenge yourself with exercises

Challenge yourself with exercises

Work with real data from day one with interactive lessons and hands-on exercises.

Showcase your path certification

Showcase your path certification

Impress employers by completing a capstone project and certifying it with an expert review.

Grow your career with
Dataquest.

97%
of learners recommend
Dataquest for career advancement
4.9
Dataquest rating on
G2Crowd and SwitchUp
$30k
Average salary boost
for learners who complete a path
Aaron

Aaron Melton

Business Analyst at Aditi Consulting

“Dataquest starts at the most basic level, so a beginner can understand the concepts. I tried learning to code before, using Codecademy and Coursera. I struggled because I had no background in coding, and I was spending a lot of time Googling. Dataquest helped me actually learn.”

Jessi

Jessica Ko

Machine Learning Engineer at Twitter

“I liked the interactive environment on Dataquest. The material was clear and well organized. I spent more time practicing then watching videos and it made me want to keep learning.”

Victoria

Victoria E. Guzik

Associate Data Scientist at Callisto Media

“I really love learning on Dataquest. I looked into a couple of other options and I found that they were much too handhold-y and fill in the blank relative to Dataquest’s method. The projects on Dataquest were key to getting my job. I doubled my income!”

Join 1M+ data learners on
Dataquest.

1

Sign up for a free account

2

Choose a course or path

3

Learn with hands-on exercises

4

Apply your skills

Start learning with a free account today.