MCPcopy
hub / github.com/GPflow/GPflow / predict_mean_and_var

Method predict_mean_and_var

gpflow/likelihoods/base.py:141–168  ·  view source on GitHub ↗

Given a Normal distribution for the latent function, return the mean and marginal variance of Y, i.e. if q(f) = N(Fmu, Fvar) and this object represents p(y|f) then this method computes the predictive mean ∫∫ y p(y|f)q(f

(
        self, X: TensorType, Fmu: TensorType, Fvar: TensorType
    )

Source from the content-addressed store, hash-verified

139 "return[1]: [batch..., observation_dim]",
140 )
141 def predict_mean_and_var(
142 self, X: TensorType, Fmu: TensorType, Fvar: TensorType
143 ) -> MeanAndVariance:
144 """
145 Given a Normal distribution for the latent function,
146 return the mean and marginal variance of Y,
147
148 i.e. if
149 q(f) = N(Fmu, Fvar)
150
151 and this object represents
152
153 p(y|f)
154
155 then this method computes the predictive mean
156
157 ∫∫ y p(y|f)q(f) df dy
158
159 and the predictive variance
160
161 ∫∫ y² p(y|f)q(f) df dy - [ ∫∫ y p(y|f)q(f) df dy ]²
162
163 :param X: input tensor
164 :param Fmu: mean function evaluation tensor
165 :param Fvar: variance of function evaluation tensor
166 :returns: mean and variance
167 """
168 return self._predict_mean_and_var(X, Fmu, Fvar)
169
170 @abc.abstractmethod
171 @check_shapes(

Calls 1

_predict_mean_and_varMethod · 0.95