For doing linear regression with Python, we can use statsmodels library
’
s API functions,
as follows:
import statsmodels.api as sm
lr_model = sm.OLS(y, X).
?
t()
Here, lr_model is the model built using linear regression with the OLS ?tting approach.
’
s API functions,
as follows:
import statsmodels.api as sm
lr_model = sm.OLS(y, X).
?
t()
Here, lr_model is the model built using linear regression with the OLS ?tting approach.
