There's a fairly good rundown of score() here:
"[Python/Sklearn] How does .score() works?"
https://www.kaggle.com/getting-started/27261
On 10/26/2022 2:18 AM, Fatemeh Heydari wrote:
On Monday, October 24, 2022 at 7:14:10 AM UTC-7, Reto wrote:
On Sun, Oct 23, 2022 at 05:11:10AM -0700, Fatemeh Heydari wrote:
model.score(X,Y)
That will basically check how good your model is.
It takes a bunch of X values with known values, which you provide in Y
and compares the output of model.Predict(X) with the Y's and gives you
some metrics as to how good that performed.
In the case of linear regression that be R^2, the coefficient of determination
of the prediction.
Cheers,
Reto
Dear Reto
Thanks for your attention. But I calculated R^2 for the model with the code :
r2_score(predictedY,Y)
and I got different result from the "score " function. I wish to know what
mathematical formulation is behind this function
Thanks again
--
https://mail.python.org/mailman/listinfo/python-list