mcframework.stats_engine.mse_to_target#
- mcframework.stats_engine.mse_to_target(x: ndarray, ctx: StatsContext) float[source]#
Mean squared error of \(\bar X\) relative to a target \(\theta\).
Approximated by
\[\mathrm{MSE}(\bar X) \approx \frac{s^2}{n} + (\bar X - \theta)^2.\]- Parameters:
- x
ndarray Input sample.
- ctx
StatsContextorMapping Requires
target.
- x
- Returns:
floatEstimated mean squared error relative to
target.