models.deviance_score()
A score for cross_validate: the family’s mean deviance on the
Usage
models.deviance_score(
family,
theta=None,
power=None,
)test rows, sum(w * d) / sum(w) with the test design’s weights.
Parameters
family: str-
As Glm.
theta: float = Nonepower: float = None
Returns
callable-
score(y_test, predicted, test_design) -> float.
Examples
>>> from prospicio.models import Design, deviance_score
>>> d = Design([[1.0, 1.0]], ["(Intercept)"])
>>> deviance_score("gaussian")([1.0, 3.0], [2.0, 2.0], d)1.0