wildcat89
wildcat89

Reputation: 1285

Clarification on SKLearn's 'neg_root_mean_squared_error' score

If I'm running some RFECV runs with various regressors, using neg_root_mean_squared_error as the scoring metric, when I executed the score = rfe.score(X_train, y_train) line, I get scores that look like this:

Score_Output

So, which of these would be a "better" score? I thought neg_root_mean_squared_error would produce a negative number? So if these are positive, would I want to aim for the LOWER numbers?

Thanks!

Upvotes: 1

Views: 2051

Answers (1)

Ben Reiniger
Ben Reiniger

Reputation: 12602

The RFECV's score method is still just a delegate to its model's score method, and so for these probably the R2 score, not your negative rmse. The negative rmse is being used to determine which number of features to select; you can also see some of those scores in the grid_scores_ or cv_results_ attribute, and can use the mean_squared_error metric function to find those scores for the refit estimator.

Upvotes: 1

Related Questions