PredictionResult

Container returned by GAM.predict() for type="response" or type="link".

Usage

Source

PredictionResult(
    values,
    se,
    linear_predictor,
    lower=None,
    upper=None,
)

Bundles the point predictions together with their optional standard errors and interval bounds so that all quantities produced by a single predict() call travel together. Use values for the predictions themselves; the other attributes are populated only when the corresponding arguments (se=True, interval=...) were requested.

Attributes

values: numpy.ndarray

Predicted values, shape (n,). On the response scale (mu) when type="response", or on the linear predictor scale (eta) when type="link".

se: numpy.ndarray or None

Standard errors of the linear predictor, shape (n,). None unless se=True was passed to predict().

linear_predictor: numpy.ndarray

Predictions on the linear predictor scale, shape (n,). Always populated, regardless of type, so that the response-scale mean can be recovered via the link function.

lower: numpy.ndarray or None

Lower bound of the requested interval, on the same scale as values. None unless interval was set to "confidence", "prediction", or "simultaneous".

upper: numpy.ndarray or None
Upper bound of the requested interval, on the same scale as values. None unless interval was set.