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))
def predict(model, X, joint_contribution=False):
Returns a triple (prediction, bias, feature_contributions), such
After Change
else:
mean_pred = None
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):
Returns a triple (prediction, bias, feature_contributions), such
In pattern: SUPERPATTERN
Frequency: 5
Non-data size: 7
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: inspirehep/magpie
Commit Name: e4488b9b68416439a226b48b74c22ae84c129db1
Time: 2016-02-10
Author: jan.stypka@cern.ch
File Name: magpie/api.py
Class Name:
Method Name: batch_test
Project Name: kwgoodman/numerox
Commit Name: 841ea44e30577258ddae735701ef45055abdc3f8
Time: 2018-08-30
Author: kwgoodman@gmail.com
File Name: numerox/prediction.py
Class Name: Prediction
Method Name: __repr__
Project Name: nipy/dipy
Commit Name: f84d08c5d0dbd61cc2196d1b9739009241340593
Time: 2012-11-09
Author: Bago.Amirbekian@ucsf.edu
File Name: dipy/sims/phantom.py
Class Name:
Method Name: add_noise
Project Name: Scitator/catalyst
Commit Name: 1a73a1367fedfa8368b6c42103e60e1b370bc14a
Time: 2019-04-19
Author: scitator@gmail.com
File Name: catalyst/contrib/criterion/focal_loss.py
Class Name: FocalLoss
Method Name: forward