4d7ff76cfbaf5fb8a57d8f3232c989e8e2c2f5b5,keras/wrappers/scikit_learn.py,KerasClassifier,score,#KerasClassifier#Any#Any#,207

Before Change


                Mean accuracy of predictions on X wrt. y.
        """
        kwargs = self.filter_sk_params(Sequential.evaluate, kwargs)
        kwargs.update({"show_accuracy": True})
        loss, accuracy = self.model.evaluate(X, y, **kwargs)
        return accuracy

After Change


        """
        kwargs = self.filter_sk_params(Sequential.evaluate, kwargs)
        outputs = self.model.evaluate(X, y, **kwargs)
        if type(outputs) is not list:
            outputs = [outputs]
        for name, output in zip(self.model.metrics_names, outputs):
            if name == "acc":
                return output
        raise Exception("The model is not configured to compute accuracy. "
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 5

Instances


Project Name: keras-team/keras
Commit Name: 4d7ff76cfbaf5fb8a57d8f3232c989e8e2c2f5b5
Time: 2016-04-01
Author: francois.chollet@gmail.com
File Name: keras/wrappers/scikit_learn.py
Class Name: KerasClassifier
Method Name: score


Project Name: merenlab/anvio
Commit Name: 04bd843050842490a291ce610079a268f043a287
Time: 2019-12-12
Author: alon.shaiber@gmail.com
File Name: anvio/migrations/config/v0_to_v1.py
Class Name:
Method Name: migrate


Project Name: keras-team/keras
Commit Name: 4d7ff76cfbaf5fb8a57d8f3232c989e8e2c2f5b5
Time: 2016-04-01
Author: francois.chollet@gmail.com
File Name: keras/wrappers/scikit_learn.py
Class Name: KerasRegressor
Method Name: score