最大误差#
- sklearn.metrics.max_error(y_true, y_pred)[source]#
- max_error 度量计算最大残差误差。 - 在 用户指南 中了解更多信息。 - 参数:
- y_true形状为 (n_samples,) 的类数组
- 真实(正确)目标值。 
- y_pred形状为 (n_samples,) 的类数组
- 估计的目标值。 
 
- 返回值:
- max_error浮点数
- 一个正浮点数(最佳值为 0.0)。 
 
 - 示例 - >>> from sklearn.metrics import max_error >>> y_true = [3, 2, 7, 1] >>> y_pred = [4, 2, 7, 1] >>> max_error(y_true, y_pred) np.int64(1) 
