predict_distribution¶
- LinearModel.predict_distribution(predictors: dict) ndarray
- Predicts a posterior distribution for an unobserved values. For each posterior sample, it draws a sample from
the likelihood.
Parameters¶
- predictorsdict
Values of predictors \(X\) at which compute the posterior distribution. Each predictor has to be set as a key-value pair.
Returns¶
- numpy.ndarray
Array 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¶
- TypeError
If
predictorsis not adict.- KeyError
If a
predictorskey is not a key ofposteriors.- ValueError
If
predictorsis an emptydict.
See Also¶