Beispiel #1
0
 def CreateAsPrior(cls, argDict, Data):
   ''' Creates Gaussian-Wishart prior for params that generate Data.
       Returns GaussWishDistr object with same dimension as Data.
       Provided argDict specifies prior's expected covariance matrix
                                     and expected mean 
   '''
   D = Data.dim
   m = np.zeros(D)
   dF = np.maximum( argDict['dF'], D+2)
   kappa = argDict['kappa']
   ECovMat = WishartDistr.createECovMatFromUserInput(argDict, Data)    
   invW = ECovMat * (dF - D - 1) 
   return cls(dF=dF, kappa=kappa, m=m, invW=invW)
 def CreateAsPrior(cls, argDict, Data):
     """ Creates Gaussian-Wishart prior for params that generate Data.
     Returns GaussWishDistr object with same dimension as Data.
     Provided argDict specifies prior's expected covariance matrix
                                   and expected mean 
 """
     D = Data.dim
     m = np.zeros(D)
     dF = np.maximum(argDict["dF"], D + 2)
     kappa = argDict["kappa"]
     ECovMat = WishartDistr.createECovMatFromUserInput(argDict, Data)
     invW = ECovMat * (dF - D - 1)
     return cls(dF=dF, kappa=kappa, m=m, invW=invW)
Beispiel #3
0
 def logWishNormConst(self):
   return WishartDistr.calc_log_norm_const(self.logdetW(), self.dF, self.D)
 def logWishNormConst(self):
     return WishartDistr.calc_log_norm_const(self.logdetW(), self.dF, self.D)