BacktestResult.mean_log_score#

property BacktestResult.mean_log_score: NDArray[float64][source]#

(H, k) mean negative log predictive densities; needs draws.

Raises:

SpecificationError – If the backtest recorded no draws.

Example

>>> import numpy as np
>>> from cultivars.multivariate.large_dim.bayesian import BVAR
>>> y = np.random.default_rng(0).standard_normal((140, 2))
>>> fit = lambda w: BVAR(w, order=1).fit(n_draws=50, seed=0)
>>> Backtest(y, fit, horizons=2, start=130, step=5).run().mean_log_score.shape
(2, 2)