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

Before Change


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


class KerasRegressor(BaseWrapper):
    """Implementation of the scikit-learn regressor API for Keras.

After Change


        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. "
                        "You should pass `metrics=["accuracy"]` to "
                        "the `model.compile()` method.")


class KerasRegressor(BaseWrapper):
    """Implementation of the scikit-learn regressor API for Keras.
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: keras-team/keras
Commit Name: 45577f7959dab9e29044d5ac794c8349624b4bcc
Time: 2015-10-26
Author: farizrahman4u@gmail.com
File Name: keras/layers/core.py
Class Name: Lambda
Method Name: output_shape


Project Name: keras-team/keras
Commit Name: 2ab9f0ef616c6d05124bdf9c81eb542d73f8e5b6
Time: 2015-06-30
Author: francois.chollet@gmail.com
File Name: keras/layers/containers.py
Class Name: Graph
Method Name: get_input