9cdd21160f4b4352b05f7b7ce9f0f63506c585c9,benchmarks/bench_ml.py,MLBench,evaluate,#MLBench#Any#,192

Before Change



        // while negative values could be informative, they could be very large also,
        // which could mess up the optimization procedure. Suggestions are welcome.
        return max(r, 0.0)

// this is necessary to generate table for README in the end
table_template = |Blackbox Function| Minimum | Best minimum |
------------------|------------|-----------|---------------------|

After Change


            model_instance.fit(X_train, y_train)
            if isinstance(model_instance, RegressorMixin): // r^2 metric
                y_predicted = model_instance.predict(X_test)
                score = r2_score(y_test, y_predicted)
            elif isinstance(model_instance, ClassifierMixin): // log loss
                y_predicted = model_instance.predict_proba(X_test)
                score = -log_loss(y_test, y_predicted) // in the context of this function, the higher score is better
            // avoid any kind of singularitites, eg probability being zero, and thus breaking the log_loss
            if math.isnan(score):
                score = min_obj_val
            score = max(score, min_obj_val) // this is necessary to avoid -inf or NaN
        except BaseException as ex:
            score = min_obj_val // on error: return assumed smallest value of objective function

        return score

// this is necessary to generate table for README in the end
table_template = |Blackbox Function| Minimum | Best minimum |
------------------|------------|-----------|---------------------|
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 6

Instances


Project Name: scikit-optimize/scikit-optimize
Commit Name: 9cdd21160f4b4352b05f7b7ce9f0f63506c585c9
Time: 2017-04-17
Author: iaroslav-ai@users.noreply.github.com
File Name: benchmarks/bench_ml.py
Class Name: MLBench
Method Name: evaluate


Project Name: scikit-multiflow/scikit-multiflow
Commit Name: abd0f7b5564e51a412bb7f85e040985d14eb0a4e
Time: 2019-10-06
Author: jacob.montiel@gmail.com
File Name: src/skmultiflow/meta/adaptive_random_forests.py
Class Name: AdaptiveRandomForest
Method Name: predict


Project Name: rtavenar/tslearn
Commit Name: 85aabb5014e22659ac722280607a1f4b44e1fb32
Time: 2020-05-03
Author: romain.tavenard@univ-rennes2.fr
File Name: tslearn/shapelets.py
Class Name: ShapeletModel
Method Name: predict