nemos.observation_models.Observations.estimate_scale#
- abstractmethod Observations.estimate_scale(y, predicted_rate, dof_resid)[source]#
Estimate the scale parameter for the model.
This method estimates the scale parameter, often denoted as \(\phi\), which determines the dispersion of an exponential family distribution. The probability density function (pdf) for such a distribution is generally expressed as \(f(x; \theta, \phi) \propto \exp \left(a(\phi)\left( y\theta - \mathcal{k}(\theta) \right)\right)\).
The relationship between variance and the scale parameter is given by:
\[\text{var}(Y) = \frac{V(\mu)}{a(\phi)}.\]The scale parameter, \(\phi\), is necessary for capturing the variance of the data accurately.
- Parameters:
y (
Array
) – Observed activity.predicted_rate (
Array
) – The predicted rate values.dof_resid (
Union
[float
,Array
]) – The DOF of the residual.
- Return type:
Union
[float
,Array
]