# Calculating error from accuracy score in Sklearn

I have one question thats maybe simple, but my brain overfited :)

I wrote a code for simple linear regression in Python and Scikit-Learn, and I calculated score of my model.

        accuracy_test = model.score(x_test, y_test)


I got the score of 0.97. Does that mean that my error is 0.03 (3%)? For example, Is it correct to say, that If i predict some value with model.predict function, and I get result of 100 with that, that I can say that my result will be in range from 97 to 103 because of my 3% error (score of 0.97)?

Can you say this for accuracy_score also?

• I guess that is accuracy and 3% error signifies that among all the data in test case only 3% were falsely predicted. Your second statement : "and I get result of 100 with that, ... 3% error (score of 0.97)? " is wrong. The error has nothing to do with the range. The error simply says how much of the difference was there in true and predicted. If you run the model again you "might" get different accuracy and error. Dec 27 '19 at 16:55

Returns the coefficient of determination R^2 of the prediction.

accuracy_score is a measure of accuracy for classification models. Again, you cannot construct confidence intervals from the accuracy metric.