StructuredAdditiveTerm.predict()

StructuredAdditiveTerm.predict()#

StructuredAdditiveTerm.predict(samples, x=None, center=False, scale=False)[source]#

Computes predicted values given an array of posterior samples.

Can be thought of as the sum of the predictions for the individual terms obtained with StructuredAdditiveTerm.predict_elementwise().

Parameters:
  • samples (dict[str, Any]) – Array of posterior samples.

  • x (Optional[Any]) – Array of covariate values. (default: None)

  • center (bool) – Whether to center the predictions. (default: False)

  • scale (bool) – Whether to scale the predictions. (default: False)

Return type:

Any

Returns:

Array of prediction values.