## evaluate.DEFAULT_METRICS


Default metrics used by [backtest()](evaluate.backtest.md#numpyro_forecast.evaluate.backtest) and [backtest_vectorized()](evaluate.backtest_vectorized.md#numpyro_forecast.evaluate.backtest_vectorized).


`evaluate.DEFAULT_METRICS: dict[str, Metric] = {``"mae": eval_mae, `<span class="st">`"rmse"``: eval_rmse, ``"crps"``: eval_crps, ``"coverage"``: eval_coverage}`</span>


[eval_mae()](evaluate.eval_mae.md#numpyro_forecast.evaluate.eval_mae), [eval_rmse()](evaluate.eval_rmse.md#numpyro_forecast.evaluate.eval_rmse), [eval_crps()](evaluate.eval_crps.md#numpyro_forecast.evaluate.eval_crps), [eval_coverage()](evaluate.eval_coverage.md#numpyro_forecast.evaluate.eval_coverage), [eval_pinball()](metrics.eval_pinball.md#numpyro_forecast.metrics.eval_pinball), [eval_interval_score()](metrics.eval_interval_score.md#numpyro_forecast.metrics.eval_interval_score) and the metric of [make_mase()](metrics.make_mase.md#numpyro_forecast.metrics.make_mase) return NaN when a `truth` value or a forecast draw is NaN, for example a missing observation in the test window. So with these metrics a window with a NaN gets NaN for every metric, and dropping the NaN rows of a backtest table drops that whole window. To score a test window with missing observations, drop the missing cells before scoring, for example `pred[:, mask]` and `truth[mask]` with `mask = ~jnp.isnan(truth)`. In [backtest()](evaluate.backtest.md#numpyro_forecast.evaluate.backtest), pass `transform=lambda p, t: (p[:, ~jnp.isnan(t)], t[~jnp.isnan(t)])` to score each window on its observed cells. [backtest_vectorized()](evaluate.backtest_vectorized.md#numpyro_forecast.evaluate.backtest_vectorized) has no `transform`, and a metric that masks this way raises [VectorizedMetricError](exceptions.VectorizedMetricError.md#numpyro_forecast.exceptions.VectorizedMetricError) because the mask gives a value-dependent shape under `vmap`. This covers scoring only: in a backtest the model itself must handle a gap that falls in a later training window. The rule covers NaN only: an infinite truth value or draw gives a finite, infinite or NaN score depending on the metric.
