Im using following code to train my model
trip_model = sm.OLS(x_dependent, y_variables).fit()
and print summary as
trip_model.summary()
I just want to take only the following values out of Summary
F-statistic , coef
how to get it?
Im using following code to train my model
trip_model = sm.OLS(x_dependent, y_variables).fit()
and print summary as
trip_model.summary()
I just want to take only the following values out of Summary
F-statistic , coef
how to get it?
The value returned by the fit
function is a RegressionResults
structure. You can check the documentation to see how to access each particular value:
f_statistic = trip_model.fvalue
coef = trip_model.params