28793deaf98b37ef5d9425c1ec975a11b397e465,dask_ml/model_selection/_incremental.py,BaseIncrementalSearchCV,_get_best,#BaseIncrementalSearchCV#Any#Any#,505

Before Change


        // type: (Dict, Dict) -> Estimator
        Select the best estimator from the set of estimators.
        best_model_id = first(results.info)
        key = operator.itemgetter("model_id")
        best_index = -1
        // history_results is sorted by (model_id, partial_fit_calls)
        // best is the model_id with the highest partial fit calls
        for k, v in itertools.groupby(history_results, key=key):

After Change


        // Happens in the test case a lot
        model_ids = list(scores.keys())
        scores = [scores[k] for k in model_ids]
        model_idx = np.argmax(scores)
        best_model_id = model_ids[model_idx]

        best_est = results.models[best_model_id]
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 3

Instances


Project Name: dask/dask-ml
Commit Name: 28793deaf98b37ef5d9425c1ec975a11b397e465
Time: 2018-10-13
Author: github@stsievert.com
File Name: dask_ml/model_selection/_incremental.py
Class Name: BaseIncrementalSearchCV
Method Name: _get_best


Project Name: DagnyT/hardnet
Commit Name: 04cd555be76efc7baced753c751c4257d41eb75d
Time: 2017-07-27
Author: ducha.aiki@gmail.com
File Name: EvalMetrics.py
Class Name:
Method Name: ErrorRateAt95Recall


Project Name: Qiskit/qiskit-aqua
Commit Name: 089e8b4b48eb1c248b4cf7d83312334b333900d6
Time: 2018-08-31
Author: chenrich@us.ibm.com
File Name: qiskit_aqua/algorithms/adaptive/qsvm/svm_variational.py
Class Name: SVM_Variational
Method Name: _get_prediction