Patrick

“It has been hard to find a resource with this combination of theory and coded examples, which is why I was so excited when I was introduced to Dataquest.”

Patrick Nelli

VP of Corporate Analytics @Health Catalyst

Course overview

Linear regression shows us how we can use data to predict the value of an outcome. This course covers the structure of a linear regression model, how to interpret it, how to determine if a model is appropriate, and how to use the model to predict values of new data.

In this course, you’ll learn to create single and multiple linear regressions, identify the different types of predictors, and identify a cost function for linear regression. You’ll also learn how to interpret regression parameters, how to check linear regression fit, and how to apply linear regression models.

You will use tools such as scikit-learn, statsmodels, pandas, NumPy and matplotlib.

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 insurance costs.

Key skills

  • Describing a linear regression model
  • Constructing a linear regression model and evaluating it based on the data
  • Interpreting the results of a linear regression model
  • Using a linear regression model for inference and prediction

Course outline

Linear Regression Modeling in Python [5 lessons]

Introduction to Linear Regression 1h

Lesson Objectives
  • Define the advantages of a linear regression model
  • Identify the intercept, coefficients, and error of a linear regression model
  • Create a simple linear regression
  • Create a multiple linear regression
  • Identify different types of predictors
  • Identify a cost function for linear regression

Interpreting Regression Parameters 1h

Lesson Objectives
  • Create and fit a LinearRegression object on data
  • Interpret the intercept of a linear regression
  • Interpret the slopes of a linear regression
  • Identify changes to interpretations when categorical variables are used

Checking Linear Regression Fit 1h

Lesson Objectives
  • Describe the assumptions of linear regression
  • Assess the homoskedasticity of a model via a plot
  • Assess trends in the model error
  • Calculate and interpret the R-squared of a model

Applying Linear Regression Models 1h

Lesson Objectives
  • Distinguish between a prediction problem and an inference problem
  • Calculate the test error from a model
  • Select features that will be useful in a predictive regression model Communicate the results of a linear regression model

Guided Project: Predicting Insurance Costs 1h

Lesson Objectives
  • Investigate data and choose predictors
  • Create a linear model based
  • Evaluate the model diagnostics
  • Interpret the model results

Projects in this course

Guided Project: Predicting Insurance Costs

In this guided project, practice linear regression modeling and evaluation.

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.

98%
of learners recommend
Dataquest for career advancement
4.85
Dataquest rating
SwitchUp Best Bootcamps
$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

Create a free account

2

Choose a learning path

3

Complete exercises and projects

4

Advance your career

Start learning today