aab2ef03ff533c1160742fafd2bf12133e227ddb,nonconformist/ensemble.py,AggregatedCp,predict,#AggregatedCp#Any#Any#,41
Before Change
if self.cp_class.problem_type == "regression":
intervals = None
for predictor in self.predictors:
if intervals is None:
intervals = predictor.predict(x, significance)
else:
intervals = np.dstack([intervals,
predictor.predict(x, significance)])
p_values = self.p_agg_func(intervals)
return p_values
class BootstrapCp(AggregatedCp):
def __init__(self,
cp_class,
After Change
predictions = np.dstack([predictor.predict(x, significance) for
predictor in self.predictors])
else:
predictions = np.dstack([predictor.predict(x) for
predictor in self.predictors])
predictions = self.p_agg_func(predictions)
if significance and not is_regression:
return predictions >= significance
else:
return predictions
In pattern: SUPERPATTERN
Frequency: 4
Non-data size: 8
Instances
Project Name: donlnz/nonconformist
Commit Name: aab2ef03ff533c1160742fafd2bf12133e227ddb
Time: 2015-03-19
Author: henrik.linusson@gmail.com
File Name: nonconformist/ensemble.py
Class Name: AggregatedCp
Method Name: predict
Project Name: IBM/adversarial-robustness-toolbox
Commit Name: ef005b7af46c99ab6aec809a56bb29c9aaeaff73
Time: 2020-04-06
Author: mathsinn@ie.ibm.com
File Name: art/utils.py
Class Name:
Method Name: compute_success
Project Name: IBM/adversarial-robustness-toolbox
Commit Name: b2892275c7365da5df5ea96cbef587ea1ba6407e
Time: 2020-03-29
Author: mathsinn@ie.ibm.com
File Name: art/utils.py
Class Name:
Method Name: compute_success
Project Name: deepchem/deepchem
Commit Name: c09ca92e84f45c61f9213a32c7f01627fd467174
Time: 2017-04-12
Author: Karl
File Name: deepchem/models/tensorgraph/tensor_graph.py
Class Name: TensorGraph
Method Name: predict_proba_on_batch