Exemple #1
0
 def sampleStep( self, J, h ):
     return Normal.unpackSingleSample( Normal.sample( params=Normal.natToStandard( J, h, fromPrecision=True ) ) )
Exemple #2
0
 def sampleSingleEmission( self, x, measurements=1 ):
     assert x.size == x.squeeze().shape[ 0 ]
     return Normal.sample( nat_params=( -0.5 * self.J1Emiss, self._hy.dot( x.squeeze() ) ), size=measurements )