predict#

SuperLSS.predict(
X: object | EagerFrame,
*,
offsets: Mapping[str, NDArray] | None = None,
) → NDArray[float64] | DataFrame#

Return the conditional mean for each row with a built-in family.

Predictions use the response scale supplied to fitting. For example, LogNormalLS returns a mean on the original positive response scale. A Gaussian model fitted to a manually logged response returns a mean of that logged response.

Vector families return a DataFrame with their component columns and X’s index. Dirichlet columns are the mean shares alpha / sum(alpha). Scalar families return their existing one-dimensional arrays.

Custom families define their own default prediction quantity. Use predict_parameters for the complete parameter table and predict_quantile for a chosen conditional quantile.

A row whose predictor for a parameter leaves its link’s domain has no value of that parameter (eta <= 0 under a negative-power PowerLink): it predicts NaN, with one warning naming it, as SuperGLM.predict does; so do predict_parameters (in that parameter’s column), predict_cdf and predict_quantile. A score of such a row is refused.