You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
As per scikit-learn r2_score documentation, the function expects the arguments to be y_true followed by y_pred, however, in your implementation the order is reversed. Since R^2 is non-symmetric, it will produce a different score compared to correct order of arguments. This is hardly noticeable when predictions closely match the gt (score is close to 1.0), but will produce incorrect results otherwise.
This should print 0.999999960658854 and 0.999999960658851 (sorry for not providing a better example, I would have to give away our internal dataset to reproduce the issue, but in our case the score changes from 0.41 to 0.05)
ruslanmustafin
changed the title
[BUG] model.score does not return correct values
[BUG] model.score does not return correct values when using default r2_score
Jun 30, 2020
As per scikit-learn r2_score documentation, the function expects the arguments to be
y_true
followed byy_pred
, however, in your implementation the order is reversed. Since R^2 is non-symmetric, it will produce a different score compared to correct order of arguments. This is hardly noticeable when predictions closely match the gt (score is close to 1.0), but will produce incorrect results otherwise.Reproducing code example:
This should print
0.999999960658854
and0.999999960658851
(sorry for not providing a better example, I would have to give away our internal dataset to reproduce the issue, but in our case the score changes from 0.41 to 0.05)PySINDy/Python version information:
1.0.1 3.6.10 |Anaconda, Inc.| (default, Mar 25 2020, 23:51:54)
[GCC 7.3.0]
The text was updated successfully, but these errors were encountered: