sklearn.metrics.max_error?

sklearn.metrics.max_error(y_true, y_pred)

源碼

max_error指標計算最大殘留誤差。

用戶指南中閱讀更多內容。

參數 說明
y_true array-like of shape (n_samples,)
真實目標值。
y_pred array-like of shape (n_samples,)
預測目標值。
返回值 說明
max_error float
正浮點值(最佳值為0.0)。

示例

>>> from sklearn.metrics import max_error
>>> y_true = [3271]
>>> y_pred = [4271]
>>> max_error(y_true, y_pred)
1