문제

I am using scikit and using mean_squared_error as a scoring function for model evaluation in cross_val_score.

rms_score = cross_validation.cross_val_score(model, X, y, cv=20, scoring='mean_squared_error')

I am using mean_squared_error as it is a regression problem and the estimators (model) used are lasso, ridge and elasticNet.

For all these estimators, I am getting rms_score as negative values. How is it possible, given the fact that the differences in y values are squared.

enter image description here

도움이 되었습니까?

해결책

You get the mean_squared_error with sign flipped returned by cross_validation.cross_val_score. There is an issued opened for that (https://github.com/scikit-learn/scikit-learn/issues/2439), it's controversial if that is an API- or documentation bug.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top