mirror of
https://github.com/SheffieldML/GPy.git
synced 2026-05-05 01:32:40 +02:00
[SSGPLVM] add region constraint
This commit is contained in:
parent
c29c4e20c1
commit
5c82fe39b9
1 changed files with 3 additions and 3 deletions
|
|
@ -7,7 +7,7 @@ Created on 6 Nov 2013
|
|||
import numpy as np
|
||||
from parameterized import Parameterized
|
||||
from param import Param
|
||||
from transformations import Logexp
|
||||
from transformations import Logexp, Logistic
|
||||
|
||||
class VariationalPrior(Parameterized):
|
||||
def __init__(self, name=None, **kw):
|
||||
|
|
@ -37,7 +37,7 @@ class SpikeAndSlabPrior(VariationalPrior):
|
|||
def __init__(self, pi, variance = 1.0, name='SpikeAndSlabPrior', **kw):
|
||||
super(VariationalPrior, self).__init__(name=name, **kw)
|
||||
assert variance==1.0, "Not Implemented!"
|
||||
self.pi = Param('pi', pi)
|
||||
self.pi = Param('pi', pi, Logistic(1e-10,1-1e-10))
|
||||
self.variance = Param('variance',variance)
|
||||
self.add_parameters(self.pi)
|
||||
|
||||
|
|
@ -105,7 +105,7 @@ class SpikeAndSlabPosterior(VariationalPosterior):
|
|||
binary_prob : the probability of the distribution on the slab part.
|
||||
"""
|
||||
super(SpikeAndSlabPosterior, self).__init__(means, variances, name)
|
||||
self.gamma = Param("binary_prob",binary_prob,)
|
||||
self.gamma = Param("binary_prob",binary_prob, Logistic(1e-10,1-1e-10))
|
||||
self.add_parameter(self.gamma)
|
||||
|
||||
def plot(self, *args):
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue