mirror of
https://github.com/SheffieldML/GPy.git
synced 2026-05-03 16:52:39 +02:00
[warped stuff] plotting and normalizer in warped gps
This commit is contained in:
parent
f50b691ec6
commit
d343ec8b41
8 changed files with 112 additions and 78 deletions
|
|
@ -74,9 +74,6 @@ def helper_predict_with_model(self, Xgrid, plot_raw, apply_link, percentiles, wh
|
|||
if 'output_index' not in predict_kw['Y_metadata']:
|
||||
predict_kw['Y_metadata']['output_index'] = Xgrid[:,-1:].astype(np.int)
|
||||
|
||||
if isinstance(self, WarpedGP) and self.predict_in_warped_space:
|
||||
predict_kw['median'] = True
|
||||
|
||||
mu, _ = self.predict(Xgrid, **predict_kw)
|
||||
|
||||
if percentiles is not None:
|
||||
|
|
@ -299,8 +296,10 @@ def get_x_y_var(model):
|
|||
Y = model.Y.values
|
||||
except AttributeError:
|
||||
Y = model.Y
|
||||
if isinstance(model, WarpedGP) and model.predict_in_warped_space:
|
||||
Y = model.Y_untransformed
|
||||
|
||||
if isinstance(model, WarpedGP) and not model.predict_in_warped_space:
|
||||
Y = model.Y_normalized
|
||||
|
||||
if sparse.issparse(Y): Y = Y.todense().view(np.ndarray)
|
||||
return X, X_variance, Y
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue