English 中文(简体)
Python Linear Regression
  • 时间:2024-12-22

Python - Linear Regression


Previous Page Next Page  

In Linear Regression these two variables are related through an equation, where exponent (power) of both these variables is 1. Mathematically a pnear relationship represents a straight pne when plotted as a graph. A non-pnear relationship where the exponent of any variable is not equal to 1 creates a curve.

The functions in Seaborn to find the pnear regression relationship is regplot. The below example shows its use.

import seaborn as sb
from matplotpb import pyplot as plt
df = sb.load_dataset( tips )
sb.regplot(x = "total_bill", y = "tip", data = df)
plt.show()

Its output is as follows −

lregression.png Advertisements