fbb2c7c7007dc373c462e39ab273a183a8823d58,sklearn/model_selection/_validation.py,,_fit_and_score,#Any#Any#Any#Any#Any#Any#Any#Any#Any#Any#Any#Any#Any#Any#Any#,385
Before Change
test_scores = dict(zip(scorer.keys(),
[error_score, ] * n_scorers))
if return_train_score:
train_scores = dict(zip(scorer.keys(),
[error_score, ] * n_scorers))
else:
test_scores = error_score
if return_train_score:
train_scores = error_score
After Change
raise
elif isinstance(error_score, numbers.Number):
if isinstance(scorer, dict):
test_scores = {name: error_score for name in scorer}
if return_train_score:
train_scores = test_scores.copy()
else:
test_scores = error_score
In pattern: SUPERPATTERN
Frequency: 4
Non-data size: 7
Instances Project Name: scikit-learn/scikit-learn
Commit Name: fbb2c7c7007dc373c462e39ab273a183a8823d58
Time: 2019-09-10
Author: thomasjpfan@gmail.com
File Name: sklearn/model_selection/_validation.py
Class Name:
Method Name: _fit_and_score
Project Name: NifTK/NiftyNet
Commit Name: 27c4c0613c921373e1f4f3a7de6d8455be1f2e3a
Time: 2017-07-31
Author: wenqi.li@ucl.ac.uk
File Name: niftynet/io/volume_reader.py
Class Name: VolumeReader
Method Name: _filename_to_image_list
Project Name: dgasmith/opt_einsum
Commit Name: 265614193fce8dfc8aec34be3539d9b068f5b259
Time: 2018-08-18
Author: fritzo@uber.com
File Name: opt_einsum/parser.py
Class Name:
Method Name: convert_to_valid_einsum_chars
Project Name: kengz/SLM-Lab
Commit Name: ba34b5215fa710d95f4b5c73389f86efe573c013
Time: 2018-01-21
Author: kengzwl@gmail.com
File Name: slm_lab/experiment/control.py
Class Name: Trial
Method Name: run