#Regression

Linear regression is a fundamental method in data analysis to understand the relationship between two variables. Here, I summarize four reusable Python functions for performing and visualizing linear fitting:

  1. Matplotlib: with and without intercept
  2. Plotly: with and without intercept

All methods:

  • Drop NaN values in x and y
  • Plot a scatter graph
  • Fit a linear line
  • Annotate the equation and correlation coefficient (R)

Read More

Your browser is out-of-date!

Update your browser to view this website correctly. Update my browser now

×