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


    X_train, y_train = _safe_split(estimator, X, y, train)
    X_test, y_test = _safe_split(estimator, X, y, test, train)

    is_multimetric = not callable(scorer)
    n_scorers = len(scorer.keys()) if is_multimetric else 1
    try:
        if y_train is None:
            estimator.fit(X_train, **fit_params)
        else:

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
                if return_train_score:
                    train_scores = error_score
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 6

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: pavlin-policar/openTSNE
Commit Name: 1e15eeebbe3f9647f4a024ce9d44f5f6bb37b179
Time: 2018-06-22
Author: pavlin.g.p@gmail.com
File Name: tsne/tsne.py
Class Name: TSNE
Method Name: __init__


Project Name: hyperspy/hyperspy
Commit Name: 148a63df4c40c063e1aaf36b09a2057efd38daf9
Time: 2020-07-18
Author: tjof2@cam.ac.uk
File Name: hyperspy/models/model1d.py
Class Name: Model1D
Method Name: _jacobian