您当前的位置: 首页 > 
  • 0浏览

    0关注

    2393博文

    0收益

  • 0浏览

    0点赞

    0打赏

    0留言

私信
关注
热门博文

成功解决r2_score函数输出值始终为0的情况

一个处女座的程序猿 发布时间:2019-12-31 10:27:18 ,浏览量: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
 
关注
打赏
1664196048
查看更多评论
立即登录/注册

微信扫码登录

0.0489s