Merge pull request #318 from SheffieldML/gpy_one_fixes

Gpy one fixes
This commit is contained in:
Max Zwiessele 2016-03-06 12:11:51 +00:00
commit 99caca6702
3 changed files with 11 additions and 4 deletions

View file

@ -395,9 +395,9 @@ class GP(Model):
var_jac = compute_cov_inner(self.posterior.woodbury_inv)
return mean_jac, var_jac
def predict_wishard_embedding(self, Xnew, kern=None, mean=True, covariance=True):
def predict_wishart_embedding(self, Xnew, kern=None, mean=True, covariance=True):
"""
Predict the wishard embedding G of the GP. This is the density of the
Predict the wishart embedding G of the GP. This is the density of the
input of the GP defined by the probabilistic function mapping f.
G = J_mean.T*J_mean + output_dim*J_cov.
@ -425,6 +425,10 @@ class GP(Model):
G += Sigma
return G
def predict_wishard_embedding(self, Xnew, kern=None, mean=True, covariance=True):
warnings.warn("Wrong naming, use predict_wishart_embedding instead. Will be removed in future versions!", DeprecationWarning)
return self.predict_wishart_embedding(Xnew, kern, mean, covariance)
def predict_magnification(self, Xnew, kern=None, mean=True, covariance=True):
"""
Predict the magnification factor as

View file

@ -70,7 +70,10 @@ class Kern(Parameterized):
@Cache_this(limit=20)
def _slice_X(self, X):
return X[:, self._all_dims_active]
try:
return X[:, self._all_dims_active].astype('float')
except:
return X[:, self._all_dims_active]
def K(self, X, X2):
"""

View file

@ -254,7 +254,7 @@ class PlotlyPlots(AbstractPlottingLibrary):
font=dict(color='white' if np.abs(var) > 0.8 else 'black', size=10),
opacity=.5,
showarrow=False,
hoverinfo='x'))
))
return imshow, annotations
def annotation_heatmap_interact(self, ax, plot_function, extent, label=None, resolution=15, imshow_kwargs=None, **annotation_kwargs):