Skip to main content
HomePython

Course

Introduction to Linear Modeling in Python

IntermediateSkill Level
4.7+
195 reviews
Updated 08/2024
Explore the concepts and applications of linear models with python and build models to describe, predict, and extract insight from data patterns.
Start Course for Free
PythonProbability & Statistics4 hr16 videos59 Exercises5,050 XP26,589Statement of Accomplishment

Create Your Free Account

or

By continuing, you accept our Terms of Use, our Privacy Policy and that your data is stored in the USA.

Loved by learners at thousands of companies

Group

Training 2 or more people?

Try DataCamp for Business

Course Description

One of the primary goals of any scientist is to find patterns in data and build models to describe, predict, and extract insight from those patterns. The most fundamental of these patterns is a linear relationship between two variables. This course provides an introduction to exploring, quantifying, and modeling linear relationships in data, by demonstrating techniques such as least-squares, linear regression, estimatation, and bootstrap resampling. Here you will apply the most powerful modeling tools in the python data science ecosystem, including scipy, statsmodels, and scikit-learn, to build and evaluate linear models. By exploring the concepts and applications of linear models with python, this course serves as both a practical introduction to modeling, and as a foundation for learning more advanced modeling techniques and tools in statistics and machine learning.

Prerequisites

Introduction to Regression with statsmodels in Python
1

Exploring Linear Trends

We start the course with an initial exploration of linear relationships, including some motivating examples of how linear models are used, and demonstrations of data visualization methods from matplotlib. We then use descriptive statistics to quantify the shape of our data and use correlation to quantify the strength of linear relationships between two variables.
Start Chapter
2

Building Linear Models

Here we look at the parts that go into building a linear model. Using the concept of a Taylor Series, we focus on the parameters slope and intercept, how they define the model, and how to interpret the them in several applied contexts. We apply a variety of python modules to find the model that best fits the data, by computing the optimal values of slope and intercept, using least-squares, numpy, statsmodels, and scikit-learn.
Start Chapter
3

Making Model Predictions

Next we will apply models to real data and make predictions. We will explore some of the most common pit-falls and limitations of predictions, and we evaluate and compare models by quantifying and contrasting several measures of goodness-of-fit, including RMSE and R-squared.
Start Chapter
4

Estimating Model Parameters

Introduction to Linear Modeling in Python
Course
Complete

Earn Statement of Accomplishment

Add this credential to your LinkedIn profile, resume, or CV
Share it on social media and in your performance review
Enroll Now

Don’t just take our word for it

*4.7
from 195 reviews
79%
16%
4%
1%
0%
  • Emin
    5 days ago

  • Mark
    2 weeks ago

    Good learning content and solid foundation

  • Siphiwe
    2 weeks ago

  • Alex
    2 weeks ago

  • Chun Yu
    3 weeks ago

  • Sofia Esther
    3 weeks ago

Emin

"Good learning content and solid foundation"

Mark

Siphiwe

FAQs

Which Python libraries does this course use for building linear models?

You use scipy, statsmodels, and scikit-learn to build and evaluate linear models. You also use numpy for computations and matplotlib for data visualization throughout the course.

What level of Python and statistics knowledge is required?

This is an advanced course requiring completion of six prerequisites including Intermediate Python, Introduction to Statistics in Python, and Introduction to Regression with statsmodels.

Does the course cover how to evaluate model quality?

Yes. Chapter 3 teaches you to quantify model performance using RMSE and R-squared, and to compare models to determine which best fits your data.

What is bootstrap resampling and is it covered here?

Bootstrap resampling is a technique for estimating uncertainty in model parameters by repeatedly sampling from your data. Chapter 4 teaches you to apply it alongside maximum likelihood estimation.

How does the course progress from exploration to inference?

You start with data visualization and correlation, then build models with slope and intercept, move to predictions and evaluation, and finish with inferential statistics and parameter estimation.

Join over 19 million learners and start Introduction to Linear Modeling in Python today!

Create Your Free Account

or

By continuing, you accept our Terms of Use, our Privacy Policy and that your data is stored in the USA.

Grow your data skills with DataCamp for Mobile

Make progress on the go with our mobile courses and daily 5-minute coding challenges.