diff --git a/GPy/core/gp.py b/GPy/core/gp.py index 89313ae2..898c7b58 100644 --- a/GPy/core/gp.py +++ b/GPy/core/gp.py @@ -89,7 +89,6 @@ class GP(Model): assert mean_function.output_dim == self.output_dim self.link_parameter(mean_function) - #find a sensible inference method logger.info("initializing inference method") if inference_method is None: diff --git a/GPy/core/parameterization/variational.py b/GPy/core/parameterization/variational.py index 7a58ac5e..f33e7715 100644 --- a/GPy/core/parameterization/variational.py +++ b/GPy/core/parameterization/variational.py @@ -176,11 +176,11 @@ class SpikeAndSlabPosterior(VariationalPosterior): self.mean.fix(warning=False) self.variance.fix(warning=False) if group_spike: - self.gamma_group = Param("binary_prob_group",binary_prob.mean(axis=0),Logistic(1e-6,1.-1e-6)) + self.gamma_group = Param("binary_prob_group",binary_prob.mean(axis=0),Logistic(1e-10,1.-1e-10)) self.gamma = Param("binary_prob",binary_prob, __fixed__) self.link_parameters(self.gamma_group,self.gamma) else: - self.gamma = Param("binary_prob",binary_prob,Logistic(1e-6,1.-1e-6)) + self.gamma = Param("binary_prob",binary_prob,Logistic(1e-10,1.-1e-10)) self.link_parameter(self.gamma) def propogate_val(self): diff --git a/GPy/plotting/matplot_dep/visualize.py b/GPy/plotting/matplot_dep/visualize.py index b57b7dfc..6903c2d2 100644 --- a/GPy/plotting/matplot_dep/visualize.py +++ b/GPy/plotting/matplot_dep/visualize.py @@ -408,12 +408,13 @@ class mocap_data_show_vpython(vpython_show): class mocap_data_show(matplotlib_show): """Base class for visualizing motion capture data.""" - def __init__(self, vals, axes=None, connect=None): + def __init__(self, vals, axes=None, connect=None, color='b'): if axes==None: fig = plt.figure() axes = fig.add_subplot(111, projection='3d', aspect='equal') matplotlib_show.__init__(self, vals, axes) + self.color = color self.connect = connect self.process_values() self.initialize_axes() @@ -423,7 +424,7 @@ class mocap_data_show(matplotlib_show): self.axes.figure.canvas.draw() def draw_vertices(self): - self.points_handle = self.axes.scatter(self.vals[:, 0], self.vals[:, 1], self.vals[:, 2]) + self.points_handle = self.axes.scatter(self.vals[:, 0], self.vals[:, 1], self.vals[:, 2], color=self.color) def draw_edges(self): self.line_handle = [] @@ -442,7 +443,7 @@ class mocap_data_show(matplotlib_show): z.append(self.vals[i, 2]) z.append(self.vals[j, 2]) z.append(np.NaN) - self.line_handle = self.axes.plot(np.array(x), np.array(y), np.array(z), 'b-') + self.line_handle = self.axes.plot(np.array(x), np.array(y), np.array(z), '-', color=self.color) def modify(self, vals): self.vals = vals.copy() @@ -494,7 +495,7 @@ class stick_show(mocap_data_show): class skeleton_show(mocap_data_show): """data_show class for visualizing motion capture data encoded as a skeleton with angles.""" - def __init__(self, vals, skel, axes=None, padding=0): + def __init__(self, vals, skel, axes=None, padding=0, color='b'): """data_show class for visualizing motion capture data encoded as a skeleton with angles. :param vals: set of modeled angles to use for printing in the axis when it's first created. :type vals: np.array @@ -506,7 +507,7 @@ class skeleton_show(mocap_data_show): self.skel = skel self.padding = padding connect = skel.connection_matrix() - mocap_data_show.__init__(self, vals, axes=axes, connect=connect) + mocap_data_show.__init__(self, vals, axes=axes, connect=connect, color=color) def process_values(self): """Takes a set of angles and converts them to the x,y,z coordinates in the internal prepresentation of the class, ready for plotting.