2013-11-15 45 views
1

我正在使用scikit並將mean_squared_error用作cross_val_score中模型評估的評分函數。「mean_squared_error」的負值

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

我使用mean_squared_error,因爲它是一個迴歸問題和估計中使用(模型)是lassoridgeelasticNet

對於所有這些估計值,我將rms_score設置爲負值。鑑於y值的差異是平方的,這怎麼可能?

enter image description here

+0

如果你提供一個最小化的例子,它會重現這種行爲,這將是很有幫助的。 –

回答