predict_distribution¶
- LinearModel.predict_distribution(predictors: dict[str, float | int]) np.ndarray
It predicts a posterior distribution for an unobserved values. For each posterior sample, it draws a sample from the likelihood.
Parameters¶
predictorsdictValues of predictors \(X\) at which compute the posterior distribution. Each predictor has to be set as a key-value pair.
Returns¶
numpy.ndarrayArray of the predicted posterior distribution. It contains a number of element equal to the number of regression iterations times the number of model Markov chains.
Raises
TypeErrorIf
predictorsis not adict.KeyErrorIf a
predictorskey is not a key ofposteriors.ValueErrorIf
predictorsis an emptydict.
See Also