e4bdbe76308dbeff50741415ab8c080ef99a7d70,pymc3/distributions/multivariate.py,LKJCholeskyCov,logp,#LKJCholeskyCov#Any#,698

Before Change


        logp_sd = self.sd_dist.logp(sd_vals).sum()

        corr_diag = x[diag_idxs] / sd_vals
        corr_logdet = np.log(corr_diag).sum()

        // Compute the log det jacobian of the second transformation
        // described in the docstring.
        count = np.arange(self.n - 1)
        det_invjac = - (count * tt.log(sd_vals[1:])).sum()
        det_invjac += - tt.log(x[diag_idxs]).sum() + tt.log(x[0])

        norm = _lkj_normalizing_constant(eta, self.n)

        return norm + (self.n - 1) * corr_logdet + logp_sd + det_invjac


class LKJCorr(Continuous):

After Change



        // Compute the log det jacobian of the second transformation
        // described in the docstring.
        idx = tt.arange(n)
        det_invjac = tt.log(corr_diag) - idx * tt.log(sd_vals)
        det_invjac = det_invjac.sum()

        norm = _lkj_normalizing_constant(eta, self.n)

        return norm + logp_lkj + logp_sd + det_invjac
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 7

Instances


Project Name: pymc-devs/pymc3
Commit Name: e4bdbe76308dbeff50741415ab8c080ef99a7d70
Time: 2017-03-22
Author: adrian.seyboldt@gmail.com
File Name: pymc3/distributions/multivariate.py
Class Name: LKJCholeskyCov
Method Name: logp


Project Name: uber/pyro
Commit Name: 42dc18f2a13441eefdfceed905843a3d19b27072
Time: 2020-12-07
Author: fritz.obermeyer@gmail.com
File Name: pyro/distributions/one_two_matching.py
Class Name: OneTwoMatching
Method Name: log_partition_function


Project Name: rusty1s/pytorch_geometric
Commit Name: 17aafdea24122bbb777f71a8ea7c2505e3fee84c
Time: 2019-03-15
Author: matthias.fey@tu-dortmund.de
File Name: torch_geometric/nn/models/autoencoder.py
Class Name: GAE
Method Name: reconstruction_loss