Beispiel #1
0
 def initialise(self, init):
     """ Initialise the values of the random variables in this model. """
     assert init in OPTIONS_INIT, \
         "Unknown initialisation option: %s. Should be one of %s." % (init, OPTIONS_INIT)
     self.muU, self.sigmaU = initialise_muU_sigmaU_wishart(init=init,
                                                           mu0=self.mu0,
                                                           beta0=self.beta0,
                                                           v0=self.v0,
                                                           W0=self.W0)
     self.muV, self.sigmaV = initialise_muU_sigmaU_wishart(init=init,
                                                           mu0=self.mu0,
                                                           beta0=self.beta0,
                                                           v0=self.v0,
                                                           W0=self.W0)
     self.U = initialise_U_gaussian_wishart(init=init,
                                            I=self.I,
                                            K=self.K,
                                            muU=self.muU,
                                            sigmaU=self.sigmaU)
     self.V = initialise_U_gaussian_wishart(init=init,
                                            I=self.J,
                                            K=self.K,
                                            muU=self.muU,
                                            sigmaU=self.sigmaV)
     self.tau = initialise_tau_gamma(alpha=self.alpha,
                                     beta=self.beta,
                                     R=self.R,
                                     M=self.M,
                                     U=self.U,
                                     V=self.V)
 def initialise(self,init):
     """ Initialise the values of the random variables in this model. """
     assert init in OPTIONS_INIT, \
         "Unknown initialisation option: %s. Should be one of %s." % (init, OPTIONS_INIT)
     self.U = initialise_U_volumeprior(init=init, I=self.I, K=self.K, gamma=self.gamma)
     self.V = initialise_U_gaussian(init=init, I=self.J, K=self.K, lamb=self.lamb)
     self.tau = initialise_tau_gamma(
         alpha=self.alpha, beta=self.beta, R=self.R, M=self.M, U=self.U, V=self.V)
 def initialise(self,init):
     """ Initialise the values of the random variables in this model. """
     assert init in OPTIONS_INIT, \
         "Unknown initialisation option: %s. Should be one of %s." % (init, OPTIONS_INIT)
     self.U = initialise_U_gaussian(init=init, I=self.I, K=self.K, lamb=self.lamb)
     self.V = initialise_U_gaussian(init=init, I=self.J, K=self.K, lamb=self.lamb)
     self.tau = initialise_tau_gamma(
         alpha=self.alpha, beta=self.beta, R=self.R, M=self.M, U=self.U, V=self.V)
 def initialise(self,init):
     """ Initialise the values of the random variables in this model. """
     assert init in OPTIONS_INIT, \
         "Unknown initialisation option: %s. Should be one of %s." % (init, OPTIONS_INIT)
     self.U = initialise_U_truncatednormal(
         init=init, I=self.I, K=self.K, mu=self.muUV, tau=self.tauUV)
     self.V = initialise_U_truncatednormal(
         init=init, I=self.J, K=self.K, mu=self.muUV, tau=self.tauUV)
     self.tau = initialise_tau_gamma(
         alpha=self.alpha, beta=self.beta, R=self.R, M=self.M, U=self.U, V=self.V)
 def initialise(self,init):
     """ Initialise the values of the random variables in this model. """
     assert init in OPTIONS_INIT, \
         "Unknown initialisation option: %s. Should be one of %s." % (init, OPTIONS_INIT)
     self.U = initialise_U_laplace(init=init, I=self.I, K=self.K, etaU=self.eta)
     self.V = initialise_U_laplace(init=init, I=self.J, K=self.K, etaU=self.eta)
     self.lambdaU = initialise_lambdaU_laplace(init=init, I=self.I, K=self.K, etaU=self.eta)
     self.lambdaV = initialise_lambdaU_laplace(init=init, I=self.J, K=self.K, etaU=self.eta)
     self.tau = initialise_tau_gamma(
         alpha=self.alpha, beta=self.beta, R=self.R, M=self.M, U=self.U, V=self.V)
 def initialise(self,init):
     """ Initialise the values of the random variables in this model. """
     assert init in OPTIONS_INIT, \
         "Unknown initialisation option: %s. Should be one of %s." % (init, OPTIONS_INIT)
     self.muU, self.sigmaU = initialise_muU_sigmaU_wishart(
         init=init, mu0=self.mu0, beta0=self.beta0, v0=self.v0, W0=self.W0)
     self.muV, self.sigmaV = initialise_muU_sigmaU_wishart(
         init=init, mu0=self.mu0, beta0=self.beta0, v0=self.v0, W0=self.W0)
     self.U = initialise_U_gaussian_wishart(init=init, I=self.I, K=self.K, muU=self.muU, sigmaU=self.sigmaU)
     self.V = initialise_U_gaussian_wishart(init=init, I=self.J, K=self.K, muU=self.muU, sigmaU=self.sigmaV)
     self.tau = initialise_tau_gamma(
         alpha=self.alpha, beta=self.beta, R=self.R, M=self.M, U=self.U, V=self.V)
 def initialise(self, init):
     """ Initialise the values of the random variables in this model. """
     assert init in OPTIONS_INIT, \
         "Unknown initialisation option: %s. Should be one of %s." % (init, OPTIONS_INIT)
     self.muU, self.tauU = initialise_muU_tauU_hierarchical(
         init=init,
         I=self.I,
         K=self.K,
         mu_mu=self.mu_mu,
         tau_mu=self.tau_mu,
         a=self.a,
         b=self.b)
     self.muV, self.tauV = initialise_muU_tauU_hierarchical(
         init=init,
         I=self.J,
         K=self.K,
         mu_mu=self.mu_mu,
         tau_mu=self.tau_mu,
         a=self.a,
         b=self.b)
     self.U = initialise_U_truncatednormal(init=init,
                                           I=self.I,
                                           K=self.K,
                                           mu=self.muU,
                                           tau=self.tauU)
     self.V = initialise_U_truncatednormal(init=init,
                                           I=self.J,
                                           K=self.K,
                                           mu=self.muV,
                                           tau=self.tauV)
     self.tau = initialise_tau_gamma(alpha=self.alpha,
                                     beta=self.beta,
                                     R=self.R,
                                     M=self.M,
                                     U=self.U,
                                     V=self.V)