From 346cb4693e3c61988111b2f4cd185c09cefc22f4 Mon Sep 17 00:00:00 2001 From: Max Zwiessele Date: Fri, 4 Mar 2016 11:34:04 +0000 Subject: [PATCH 1/3] [kern] inner transformation to types, start for the multitype pandas arrays --- GPy/kern/src/kern.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/GPy/kern/src/kern.py b/GPy/kern/src/kern.py index 6a746092..3985fe97 100644 --- a/GPy/kern/src/kern.py +++ b/GPy/kern/src/kern.py @@ -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): """ From b4a32a8cb16d379fa92eb300b5dadf5187f681dd Mon Sep 17 00:00:00 2001 From: Max Zwiessele Date: Fri, 4 Mar 2016 11:34:41 +0000 Subject: [PATCH 2/3] [deprecated] deprecated spelling mistake in wishart embedding --- GPy/core/gp.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/GPy/core/gp.py b/GPy/core/gp.py index 7a29664f..92b859dc 100644 --- a/GPy/core/gp.py +++ b/GPy/core/gp.py @@ -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 From de469f7ace755c0ecfbbb6048fc841deef57d8f1 Mon Sep 17 00:00:00 2001 From: Max Zwiessele Date: Fri, 4 Mar 2016 11:35:02 +0000 Subject: [PATCH 3/3] [plotting] info heatmap plotly --- GPy/plotting/plotly_dep/plot_definitions.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/GPy/plotting/plotly_dep/plot_definitions.py b/GPy/plotting/plotly_dep/plot_definitions.py index 54f04a75..eaa70f32 100644 --- a/GPy/plotting/plotly_dep/plot_definitions.py +++ b/GPy/plotting/plotly_dep/plot_definitions.py @@ -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):