Evaluator¶
Evaluator¶
- class bigdl.chronos.metric.forecast_metrics.Evaluator[source]¶
Bases:
objectEvaluate metrics for y_true and y_pred.
- static evaluate(metrics, y_true, y_pred, aggregate='mean')[source]¶
Evaluate a specific metrics for y_true and y_pred.
- Parameters
metrics – String or list in [‘mae’, ‘mse’, ‘rmse’, ‘r2’, ‘mape’, ‘smape’] for built-in metrics. If callable function, it signature should be func(y_true, y_pred), where y_true and y_pred are numpy ndarray.
y_true – Array-like of shape = (n_samples, *). Ground truth (correct) target values.
y_pred – Array-like of shape = (n_samples, *). Estimated target values.
aggregate – aggregation method. Currently, “mean” and None are supported, ‘mean’ represents aggregating by mean, while None will return the element-wise result. The value defaults to ‘mean’.
- Returns
Float or ndarray of floats. A floating point value, or an array of floating point values, one for each individual target.