I\'m new to Python and trying to perform linear regression using sklearn on a pandas dataframe. This is what I did:
data = pd.read_csv(\'xxxx.csv\') <
data = pd.read_csv(\'xxxx.csv\')
make predictions based on the result?
To predict,
lr = linear_model.LinearRegression().fit(X,Y) lr.predict(X)
Is there any way I can view details of the regression?
The LinearRegression has coef_ and intercept_ attributes.
coef_
intercept_
lr.coef_ lr.intercept_
show the slope and intercept.