af66764dca05e5b26048533eb2e71fbbb705cbf0,treeinterpreter/treeinterpreter.py,,_predict_forest,#Any#Any#Any#,117

Before Change


            predictions.append(pred)
        
        
        return (np.mean(predictions, axis=0), np.mean(biases, axis=0),
            np.mean(contributions, axis=0))

After Change


        mean_bias = None
        mean_contribution = None

        for i, tree in enumerate(model.estimators_):
            pred, bias, contribution = _predict_tree(tree, X)

            if i < 1: // first iteration
                mean_bias = bias
                mean_contribution = contribution
                mean_pred = pred
            else:
                mean_bias = _iterative_mean(i, mean_bias, bias)
                mean_contribution = _iterative_mean(i, mean_contribution, contribution)
                mean_pred = _iterative_mean(i, mean_pred, pred)

        return mean_pred, mean_bias, mean_contribution


def predict(model, X, joint_contribution=False):
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 4

Instances


Project Name: andosa/treeinterpreter
Commit Name: af66764dca05e5b26048533eb2e71fbbb705cbf0
Time: 2019-05-17
Author: vorl@volodymyrsmbp2.attlocal.net
File Name: treeinterpreter/treeinterpreter.py
Class Name:
Method Name: _predict_forest


Project Name: explosion/thinc
Commit Name: afc71e321e8e849d27e9d3b2f053c9ead11fd171
Time: 2017-02-04
Author: honnibal@gmail.com
File Name: thinc/neural/vecs2vec.py
Class Name: MeanPooling
Method Name: predict


Project Name: commonsense/conceptnet5
Commit Name: 8ea593ba135faf00d9ba39f393682172366eee9b
Time: 2017-06-09
Author: rob@luminoso.com
File Name: conceptnet5/vectors/retrofit.py
Class Name:
Method Name: retrofit