scores = cross_val_score(model,train_x,train_y,cv=5,scoring='neg_mean_squared_error')
cv或者grid_search的惯例是,会令scoring尽可能大,因为一般score是准确率这种越大越好的,而不是mse这种越小越好的。
所以mse=-neg_mean_squared_error
rmse =(-neg_mean_squared_error)**0.5
相关文章
- 03-30cv
- 03-30OpenCV:直线拟合——cv::fitLine()详解
- 03-30cv-BatchNorm学习笔记
- 03-30错误 LNK2019 无法解析的外部符号 “public: void __cdecl cv::Mat::copyTo(class cv::debug_build_guard::_OutputArray
- 03-30cv2中fftshift()函数
- 03-30module ‘cv2.cv2‘ has no attribute ‘xfeatures2d‘ 报错解决方案
- 03-30cv2.cvtColor()-颜色空间转换函数
- 03-30src\loadsave.cpp:738: error: (-215:Assertion failed) !_img.empty() in function ‘cv::imwrite‘
- 03-30解决OpenCV error: (-215:Assertion failed) size.width>0 && size.height>0 in function 'cv::im
- 03-30error: (-215:Assertion failed) size.width>0 && size.height>0 in function 'cv::imshow