成功解决r2_score函数输出值始终为0的情况
生活随笔
收集整理的這篇文章主要介紹了
成功解决r2_score函数输出值始终为0的情况
小編覺得挺不錯的,現在分享給大家,幫大家做個參考.
成功解決r2_score函數輸出值始終為0的情況
目錄
解決問題
解決方法
解決問題
r2_score函數輸出值始終為0
解決方法
將
r2_score(test_y, test_predict)
改為
r2_score(test_y[0], test_predict[0])
def r2_score(y_true, y_pred, sample_weight=None, multioutput="uniform_average"):"""R^2 (coefficient of determination) regression score function.Best possible score is 1.0 and it can be negative (because the
總結
以上是生活随笔為你收集整理的成功解决r2_score函数输出值始终为0的情况的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: DayDayUp:2019.12.30吴
- 下一篇: 成功解决 shape = pred