Pular para o conteúdo principal
Página inicialPythonIntroduction to Regression with statsmodels in Python

# Introduction to Regression with statsmodels in Python

Predict housing prices and ad click-through rate by implementing, analyzing, and interpreting regression analysis with statsmodels in Python.

Comece O Curso Gratuitamente
4 Horas14 Videos53 Exercicios
33.052 AprendizesDeclaração de Realização

## Crie sua conta gratuita

ou

Ao continuar, você aceita nossos Termos de Uso, nossa Política de Privacidade e que seus dados são armazenados nos EUA.
Treinar 2 ou mais pessoas?Experimente o DataCamp For Business

## Use Python statsmodels For Linear and Logistic Regression

Linear regression and logistic regression are two of the most widely used statistical models. They act like master keys, unlocking the secrets hidden in your data. In this course, you’ll gain the skills to fit simple linear and logistic regressions.

Through hands-on exercises, you’ll explore the relationships between variables in real-world datasets, including motor insurance claims, Taiwan house prices, fish sizes, and more.

## Discover How to Make Predictions and Assess Model Fit

You’ll start this 4-hour course by learning what regression is and how linear and logistic regression differ, learning how to apply both. Next, you’ll learn how to use linear regression models to make predictions on data while also understanding model objects.

As you progress, you’ll learn how to assess the fit of your model, and how to know how well your linear regression model fits. Finally, you’ll dig deeper into logistic regression models to make predictions on real data.

## Learn the Basics of Python Regression Analysis

By the end of this course, you’ll know how to make predictions from your data, quantify model performance, and diagnose problems with model fit. You’ll understand how to use Python statsmodels for regression analysis and be able to apply the skills to real-life data sets.
Para Empresas

### .css-1goj2uy{margin-right:8px;}Group.css-gnv7tt{font-size:20px;font-weight:700;white-space:nowrap;}.css-12nwtlk{box-sizing:border-box;margin:0;min-width:0;color:#05192D;font-size:16px;line-height:1.5;font-size:20px;font-weight:700;white-space:nowrap;}Treinar 2 ou mais pessoas?

Obtenha acesso à biblioteca completa do DataCamp, com relatórios, atribuições, projetos e muito mais centralizados
Experimente O DataCamp for BusinessPara uma solução sob medida , agende uma demonstração.

### Nas seguintes faixas

Certificação disponível

Ir para a trilha

Ir para a trilha
1. 1

### Simple Linear Regression Modeling

Grátis

You’ll learn the basics of this popular statistical model, what regression is, and how linear and logistic regressions differ. You’ll then learn how to fit simple linear regression models with numeric and categorical explanatory variables, and how to describe the relationship between the response and explanatory variables using model coefficients.

Reproduzir Capítulo Agora
A tale of two variables
50 xp
Which one is the response variable?
50 xp
Visualizing two numeric variables
100 xp
Fitting a linear regression
50 xp
Estimate the intercept
50 xp
Estimate the slope
50 xp
Linear regression with ols()
100 xp
Categorical explanatory variables
50 xp
Visualizing numeric vs. categorical
100 xp
Calculating means by category
100 xp
Linear regression with a categorical explanatory variable
100 xp
2. 2

### Predictions and model objects

In this chapter, you’ll discover how to use linear regression models to make predictions on Taiwanese house prices and Facebook advert clicks. You’ll also grow your regression skills as you get hands-on with model objects, understand the concept of "regression to the mean", and learn how to transform variables in a dataset.

3. 3

### Assessing model fit

In this chapter, you’ll learn how to ask questions of your model to assess fit. You’ll learn how to quantify how well a linear regression model fits, diagnose model problems using visualizations, and understand each observation's leverage and influence to create the model.

4. 4

### Simple Logistic Regression Modeling

Learn to fit logistic regression models. Using real-world data, you’ll predict the likelihood of a customer closing their bank account as probabilities of success and odds ratios, and quantify model performance using confusion matrices.

Para Empresas

### GroupTreinar 2 ou mais pessoas?

Obtenha acesso à biblioteca completa do DataCamp, com relatórios, atribuições, projetos e muito mais centralizados

### Nas seguintes faixas

Certificação disponível

Ir para a trilha

#### Fundamentos de estatística com Python

Ir para a trilha

Customer churn dataTaiwan real estate dataAd conversion dataS&P 500 dataFish measurement data

Maarten Van den Broeck

Senior Content Developer at DataCamp

Veja Mais