Jan-08-2020, 04:23 PM
Hi guys,
As far as I know you can calculate the accuracy of a regression model with sklearn LinearRegression
The code would be something like this :
model = LinearRegression()
accuracy = model.score(X_test, y_test)
and print(accuracy) would give you a value for how good the model performs in predicting y.
Then there also exists r2_score from sklearn metrics.
Is there a difference between those two values ? If so, what is the difference ?
thanks in advance!
As far as I know you can calculate the accuracy of a regression model with sklearn LinearRegression
The code would be something like this :
model = LinearRegression()
accuracy = model.score(X_test, y_test)
and print(accuracy) would give you a value for how good the model performs in predicting y.
Then there also exists r2_score from sklearn metrics.
Is there a difference between those two values ? If so, what is the difference ?
thanks in advance!