ad5772c4714f8938f88674d22f81572c3a00381d,linearmodels/panel/model.py,BetweenOLS,fit,#BetweenOLS#Any#Any#,427

Before Change


        // TODO: Explain this formula
        e = y
        if self._constant:
            e = e - np.average(y, weights=root_w)
        
        total_ss = float(w.T @ (e ** 2))
        r2 = 1 - residual_ss / total_ss
        

After Change


        // TODO: Explain this formula
        e = y
        if self._constant:
            e = e - (w * y).sum() / w.sum()
        
        total_ss = float(w.T @ (e ** 2))
        r2 = 1 - residual_ss / total_ss
        
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 3

Instances


Project Name: bashtage/linearmodels
Commit Name: ad5772c4714f8938f88674d22f81572c3a00381d
Time: 2017-03-31
Author: kevin.k.sheppard@gmail.com
File Name: linearmodels/panel/model.py
Class Name: BetweenOLS
Method Name: fit


Project Name: bashtage/linearmodels
Commit Name: ad5772c4714f8938f88674d22f81572c3a00381d
Time: 2017-03-31
Author: kevin.k.sheppard@gmail.com
File Name: linearmodels/panel/model.py
Class Name: PooledOLS
Method Name: fit


Project Name: analysiscenter/batchflow
Commit Name: 61570406a54b612908b37f4028cd47df4a70781a
Time: 2019-08-30
Author: nikita_007_94@mail.ru
File Name: batchflow/models/metrics/regression.py
Class Name: RegressionMetrics
Method Name: r2_score