mirror of
https://github.com/SheffieldML/GPy.git
synced 2026-06-02 14:45:15 +02:00
[ssgplvm] implement IBP prior
This commit is contained in:
parent
21a39ffb87
commit
afa0621488
4 changed files with 34 additions and 31 deletions
|
|
@ -208,8 +208,7 @@ class GP(Model):
|
|||
Kxx = kern.Kdiag(_Xnew)
|
||||
var = Kxx - np.sum(WiKx*Kx, 0)
|
||||
var = var.reshape(-1, 1)
|
||||
|
||||
var[var<0.] = 0.
|
||||
var[var<0.] = 0.
|
||||
|
||||
#force mu to be a column vector
|
||||
if len(mu.shape)==1: mu = mu[:,None]
|
||||
|
|
|
|||
|
|
@ -172,11 +172,11 @@ class SpikeAndSlabPosterior(VariationalPosterior):
|
|||
super(SpikeAndSlabPosterior, self).__init__(means, variances, name)
|
||||
self.group_spike = group_spike
|
||||
if group_spike:
|
||||
self.gamma_group = Param("binary_prob_group",binary_prob.mean(axis=0),Logistic(0.,1.))
|
||||
self.gamma_group = Param("binary_prob_group",binary_prob.mean(axis=0),Logistic(1e-6,1.-1e-6))
|
||||
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(0.,1.))
|
||||
self.gamma = Param("binary_prob",binary_prob,Logistic(1e-6,1.-1e-6))
|
||||
self.link_parameter(self.gamma)
|
||||
|
||||
def propogate_val(self):
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue