models.mean_deviance()
Weighted mean deviance sum(w d(y, mu)) / sum(w) of a family (the
Usage
models.mean_deviance(
family,
y,
mu,
weights=None,
theta=None,
power=None,
)number of rows when there are no weights): the score to compare models on held-out data.
Parameters
family: stry: list of floatmu: list of floatweights: list of float = Nonetheta: float = Nonepower: float = None
Returns
float
Examples
>>> from prospicio.models import mean_deviance
>>> mean_deviance("gaussian", [1.0, 3.0], [2.0, 2.0])1.0