245e356064ab70304b688519e7b5103f2b1b71c1,gpytorch/models/exact_prediction_strategies.py,DefaultPredictionStrategy,get_fantasy_strategy,#DefaultPredictionStrategy#Any#Any#Any#Any#Any#,90

Before Change



        lower_left = fant_train_covar.matmul(L_inverse)
        schur_root = torch.cholesky(fant_fant_covar - lower_left.matmul(lower_left.transpose(-2, -1)))
        upper_right = torch.zeros(m, schur_root.size(-1), device=L.device, dtype=L.dtype)

        // Form new root Z = [L 0; lower_left schur_root]
        num_fant = schur_root.size(-2)
        m, n = L.shape[-2:]

After Change


            Q, R = torch.qr(new_root)
            Rdiag = torch.diagonal(R, dim1=-2, dim2=-1)
            // if R is almost singular, add jitter (Rdiag is a view, so this works)
            zeroish = Rdiag.abs() < 1e-6
            if torch.any(zeroish):
                Rdiag[zeroish] = 1e-6
            new_covar_cache = torch.triangular_solve(Q.transpose(-2, -1), R)[0]
        except RuntimeError as e:
            // TODO: Deprecate once batch QR supported in latest torch stable
            if "invalid argument 1: A should be 2 dimensional" not in e.args[0]:
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 7

Instances


Project Name: cornellius-gp/gpytorch
Commit Name: 245e356064ab70304b688519e7b5103f2b1b71c1
Time: 2019-07-15
Author: balandat@fb.com
File Name: gpytorch/models/exact_prediction_strategies.py
Class Name: DefaultPredictionStrategy
Method Name: get_fantasy_strategy


Project Name: kengz/SLM-Lab
Commit Name: 2381a50a70559340a0335288d648b4bb9a675588
Time: 2018-06-12
Author: kengzwl@gmail.com
File Name: slm_lab/agent/algorithm/dqn.py
Class Name: HydraDQN
Method Name: train


Project Name: scikit-learn-contrib/DESlib
Commit Name: 7704337b2f1ef68952848b1e622e62497e0fe0b8
Time: 2017-12-27
Author: rafaelmenelau@gmail.com
File Name: pythonds/dcs/a_posteriori.py
Class Name: APosteriori
Method Name: estimate_competence