当前位置: 代码迷 >> 综合 >> R^2 score is not well-defined with less than two samples
  详细解决方案

R^2 score is not well-defined with less than two samples

热度:68   发布时间:2024-02-28 00:32:32.0

使用sklearn.metrics中的‘r2’(决定系数R^2)时,
报错:

UndefinedMetricWarning: R^2 score is not well-defined with less than two samples.

说明Y值只有一个(所以R^2不适用于留一法交叉验证

  相关解决方案