コード例 #1
0
ファイル: GaussWishDistr.py プロジェクト: csa0001/Refinery
 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)
コード例 #2
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)
コード例 #3
0
ファイル: GaussWishDistr.py プロジェクト: csa0001/Refinery
 def logWishNormConst(self):
   return WishartDistr.calc_log_norm_const(self.logdetW(), self.dF, self.D)
コード例 #4
0
 def logWishNormConst(self):
     return WishartDistr.calc_log_norm_const(self.logdetW(), self.dF, self.D)