MNT Redundant check in regression metrics
@@ -347,8 +347,7 @@ def median_absolute_error(y_true, y_pred):
0.5
"""
- y_type, y_true, y_pred, _ = _check_reg_targets(y_true, y_pred,
- 'uniform_average')
+ y_type, y_true, y_pred, _ = _check_reg_targets(y_true, y_pred, None)
if y_type == 'continuous-multioutput':
raise ValueError("Multioutput not supported in median_absolute_error")
return np.median(np.abs(y_pred - y_true))
@@ -613,7 +612,6 @@ def max_error(y_true, y_pred):
1
"""
y_type, y_true, y_pred, _ = _check_reg_targets(y_true, y_pred, None)
- check_consistent_length(y_true, y_pred)
if y_type == 'continuous-multioutput':
raise ValueError("Multioutput not supported in max_error")
return np.max(np.abs(y_true - y_pred))
