Regressões Lineares — Conceitualização

Uma abordagem simplificada

Caio Estrella
Jan 22 · 7 min read
Image for post
Image for post

O que são?

Image for post
Image for post

Mas para que isso serve?

Regressão Múltipla

Image for post
Image for post
Regressão múltipla
Image for post
Image for post
Image for post
Image for post
Image for post
Image for post
Tabela de correlação

E com mais variáveis independentes?

Um pouquinho de matemática

### Existe uma tabela 'clientes'from sklearn.linear_model import LinearRegression
xy = clientes[['Tempo como cliente', 'Tempo no App']]
z = clientes['Gasto']
lm = LinearRegression()
lm.fit(xy, z)
### lm.coef_ armazena os coeficientes angulares
pd.DataFrame({'Coeficientes Angulares': lm.coef_, 'Features': ['Tempo como cliente', 'Tempo no App']})
Image for post
Image for post
coeficientes angulares.
Image for post
Image for post

Considerações finais

Data Hackers

Blog oficial da comunidade Data Hackers

Medium is an open platform where 170 million readers come to find insightful and dynamic thinking. Here, expert and undiscovered voices alike dive into the heart of any topic and bring new ideas to the surface. Learn more

Follow the writers, publications, and topics that matter to you, and you’ll see them on your homepage and in your inbox. Explore

If you have a story to tell, knowledge to share, or a perspective to offer — welcome home. It’s easy and free to post your thinking on any topic. Write on Medium

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store