Why accuracy , not 100%

i used scikit-learn for linear regression, and after training and testing, when i did:

model.score

it showed 1.0 that means my accuracy should be 100%
but when i submitted the solution my accuracy was 97%.

In the problem statement it was written that our accuracy will be calculated on the basis of R2 algorithm, and so is used in scikit-learn?

So, where am I lacking??

hey @itzsakshi26gupta ,
you aren’t lacking anywhere , 100% score you achieved is on you training data , on which the model is being trained and hence you get the R2 score as 100.
But as you know , there isn’t any model that can perform 100% on any test set which it hasn’t seen before. That’s , the reason you get 97 % on submission .
Don’t worry about that , your model is working extremely good.
But yes to improve , you play with your data , but still i don’t think it would be able to achieve 100%.
Actually , there is no need to achieve 100%.

I hope this would have helped you.
Thank You and Happy Learning :slightly_smiling_face :slightly_smiling_face:.

1 Like