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: microsoft/nni
Commit Name: d452a1665f802bfbe75372b6c942272b252c70a2
Time: 2020-02-05
Author: Quanlu.Zhang@microsoft.com
File Name: src/sdk/pynni/nni/compression/torch/pruners.py
Class Name: LotteryTicketPruner
Method Name: prune_iteration_start


Project Name: chainer/chainercv
Commit Name: 4fda6d1c940396029a054aa5157524912fc6afa2
Time: 2018-04-10
Author: Hakuyume@users.noreply.github.com
File Name: examples/ssd/train_multi.py
Class Name:
Method Name: main