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 = [3, 2, 7, 1]
>>> y_pred = [4, 2, 7, 1]
>>> max_error(y_true, y_pred)
1