LinearTerm.predict_elementwise()#
- LinearTerm.predict_elementwise(samples, x=None, indices=None, center=False, scale=False)[source]#
Computes predicted values given an array of posterior samples.
Can be thought of as the individual terms in
predict()
.- Parameters:
x (
Optional
[Any
]) – Array of covariate values. (default:None
)indices (
Optional
[Sequence
[int
]]) – Sequence of indices, indicating which elements ofx
to return predictions for. IfNone
predictions are returned for all covariates. (default:None
)center (
bool
) – Whether to center the predictions. (default:False
)scale (
bool
) – Whether to scale the predictions. (default:False
)
- Return type:
- Returns:
Array of prediction values.