a8375b2129a7b7d925f69355d926fa4a56a6c573,gpytorch/priors/wishart_prior.py,InverseWishartPrior,log_prob,#InverseWishartPrior#Any#,107

Before Change


        self.register_buffer("C", C)

    def log_prob(self, X):
        logdetp = torch.logdet(X) if X.dim() == 2 else torch.stack([torch.logdet(p) for p in X])
        pinvK = torch.solve(self.K, X)[0]
        trpinvK = torch.diagonal(pinvK, dim1=-2, dim2=-1).sum(-1)  // trace in batch mode
        return self.C - 0.5 * ((self.nu + 2 * self.n) * logdetp + trpinvK)

After Change


        self.register_buffer("C", C)

    def log_prob(self, X):
        logdetp = torch.logdet(X)
        pinvK = torch.solve(self.K, X)[0]
        trpinvK = torch.diagonal(pinvK, dim1=-2, dim2=-1).sum(-1)  // trace in batch mode
        return self.C - 0.5 * ((self.nu + 2 * self.n) * logdetp + trpinvK)
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 4

Non-data size: 12

Instances


Project Name: cornellius-gp/gpytorch
Commit Name: a8375b2129a7b7d925f69355d926fa4a56a6c573
Time: 2019-09-24
Author: vishwaks@cs.cmu.edu
File Name: gpytorch/priors/wishart_prior.py
Class Name: InverseWishartPrior
Method Name: log_prob


Project Name: cornellius-gp/gpytorch
Commit Name: a8375b2129a7b7d925f69355d926fa4a56a6c573
Time: 2019-09-24
Author: vishwaks@cs.cmu.edu
File Name: gpytorch/priors/wishart_prior.py
Class Name: WishartPrior
Method Name: log_prob


Project Name: cornellius-gp/gpytorch
Commit Name: a8375b2129a7b7d925f69355d926fa4a56a6c573
Time: 2019-09-24
Author: vishwaks@cs.cmu.edu
File Name: gpytorch/priors/wishart_prior.py
Class Name: WishartPrior
Method Name: __init__


Project Name: cornellius-gp/gpytorch
Commit Name: a8375b2129a7b7d925f69355d926fa4a56a6c573
Time: 2019-09-24
Author: vishwaks@cs.cmu.edu
File Name: gpytorch/priors/wishart_prior.py
Class Name: InverseWishartPrior
Method Name: __init__


Project Name: cornellius-gp/gpytorch
Commit Name: a8375b2129a7b7d925f69355d926fa4a56a6c573
Time: 2019-09-24
Author: vishwaks@cs.cmu.edu
File Name: gpytorch/priors/wishart_prior.py
Class Name: InverseWishartPrior
Method Name: log_prob