def predict(self, Xnew, kern=None, pred_init=None, Y_metadata=None,<EOL>median=False, deg_gauss_hermite=<NUM_LIT:20>, likelihood=None):
<EOL>mean, var = super(WarpedGP, self).predict(Xnew, kern=kern, full_cov=False, likelihood=likelihood)<EOL>if self.predict_in_warped_space:<EOL><INDENT>std = np.sqrt(var)<EOL>if median:<EOL><INDENT>wmean = self.warping_function.f_inv(mean, y=pred_init)<EOL><DEDENT>else:<EOL><INDENT>wmean = self._get_warped_mean(mean, std, pred_init=pred_init,<EOL>deg_gauss_hermite=deg_gauss_hermite).T<EOL><DEDENT>wvar = self._get_warped_variance(mean, std, pred_init=pred_init,<EOL>deg_gauss_hermite=deg_gauss_hermite).T<EOL><DEDENT>else:<EOL><INDENT>wmean = mean<EOL>wvar = var<EOL><DEDENT>return wmean, wvar<EOL>
Prediction results depend on:
- The value of the self.predict_in_warped_space flag
- The median flag passed as argument
The likelihood keyword is never used, it is just to follow the plotting API.