forward and posterior of SingleTask #2068
-
Dear botorch users and delopers, I'm a beginner of botorc hand wondering the difference between forward and posterior method of SingleTask. However, the predicted standard deviations (pred1.stddev and pred2.stddev) in my case were exacly equal each other.
Any help would be appreciated. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
Hi @skiyohara. You can think of |
Beta Was this translation helpful? Give feedback.
Hi @skiyohara.
Model.forward(...)
evaluates the model prior. It is typically used by GPyTorch while computing the model posterior. What you get when you callmodel(X_train)
ismodel.__call__(X_train)
, which does a lot more than evaluatingmodel.forward
. When the model is ineval
mode, GPyTorch computes the posterior on call. We generally do not recommend directly using these methods with BoTorch models.You can think of
Model.posterior
as a wrapper around the GPyTorch posterior computations. In addition to computing the posterior, it applies any necessary transforms to both inputs and outputs, wraps the MVN in aPosterior
object, and ensures that the output has a consistent shape that is …