## Course overview

In this course, you’ll learn key concepts such as KNN Algorithms (K-Nearest Neighbors), error metrics including the Mean Squared Error and the Root Mean Squared Error and caret, a machine learning library for the R programming language. You’ll learn how to optimize machine learning algorithms for better accuracy and performance of trained models using hyperparameter optimization.

You’ll then dig into performing rigorous model testing using k-fold cross-validation. As you learn these new skills, you’ll be working with AirBnB prices data from Washington D.C. to predict the optimal price for generating profit from a Washington D.C. home rental.

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 complete a project to predict car prices using the K-Nearest Neighbors algorithm. This project is a chance for you to combine the skills you learned in this course and practice a machine learning workflow.

## Key skills

- Understanding the key concepts of machine learning and common pitfalls
- Identifying a proper machine learning workflow
- Implementing the k-nearest neighbors algorithm
- Employing the caret library

## Course outline

### Introduction to Machine Learning in R [6 lessons]

### Introduction to Machine Learning Concepts 1h

Lesson Objectives- Establish a machine learning workflow
- Identify how the k-nearest neighbors algorithm works
- Define the role of Euclidean distance in the k-nearest neighbors algorithm

### Evaluating Model Performance 1h

Lesson Objectives- Employ the caret library to carry out the machine learning process
- Evaluate model performance using RMSE
- Compare RMSE values between different models

### Multivariate K-Nearest Neighbors 1h

Lesson Objectives- Incorporate multiple features into your k-nearest neighbor model
- Perform more involved data cleaning through normalization
- Employ piping to create easy-to-digest summaries of your model performance

### Cross Validation 1h

Lesson Objectives- Define holdout and k-fold cross-validation
- Analyze model performance using k-fold cross-validation
- Perform k-fold cross-validation in caret

### Hyperparameter Optimization 1h

Lesson Objectives- Identify how tuning model hyperparameters can affect the model performance
- Optimize for the best hyperparameter value using grid search
- Employ caret to perform hyperparameter optimization

### Guided Project: Predicting Car Prices 1h

Lesson Objectives- Implement the machine learning workflow on a new dataset
- Employ caret to carry out the entire machine learning workflow
- Explore making models

## Projects in this course

### Guided Project: Predicting Car Prices

Practice the machine learning workflow using k-nearest neighbors to predict car prices

## The Dataquest 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.

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

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

### Build your project portfolio

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

### Challenge yourself with exercises

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

### Showcase your path certification

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