MCPcopy
hub / github.com/GPflow/GPflow / predict_log_density

Method predict_log_density

gpflow/models/cglb.py:275–293  ·  view source on GitHub ↗

Compute the log density of the data at the new data points.

(
        self,
        data: RegressionData,
        full_cov: bool = False,
        full_output_cov: bool = False,
        cg_tolerance: Optional[float] = 1e-3,
    )

Source from the content-addressed store, hash-verified

273
274 @inherit_check_shapes
275 def predict_log_density(
276 self,
277 data: RegressionData,
278 full_cov: bool = False,
279 full_output_cov: bool = False,
280 cg_tolerance: Optional[float] = 1e-3,
281 ) -> tf.Tensor:
282 """
283 Compute the log density of the data at the new data points.
284 """
285 assert_params_false(
286 self.predict_log_density, full_cov=full_cov, full_output_cov=full_output_cov
287 )
288
289 x, y = data
290 f_mean, f_var = self.predict_f(
291 x, full_cov=full_cov, full_output_cov=full_output_cov, cg_tolerance=cg_tolerance
292 )
293 return self.likelihood.predict_log_density(x, f_mean, f_var, y)
294
295
296class NystromPreconditioner:

Calls 2

predict_fMethod · 0.95
assert_params_falseFunction · 0.85