Regression
Learn how to add a regression line to an Altair chart.
We'll cover the following
Regression is a statistical technique to model the relationship between a dependent variable and one or more independent variables. The objective of regression is to predict the value of the dependent variable based on the values of the independent variables. We can use regression only on numeric variables.
How to use regression in Altair
Altair supports regression analysis in the sense that we can plot a regression line directly into an Altair plot. To perform regression in Altair, we’ll follow these steps:
We load the data using the sales prices dataset.
Get hands-on with 1200+ tech skills courses.