Python Forum
Difference between R^2 and .score
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Difference between R^2 and .score
#1
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!
Reply


Messages In This Thread
Difference between R^2 and .score - by donnertrud - Jan-08-2020, 04:23 PM

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020