b0d52d930aa00b7d0876abffe38e33d8a307b117,keras/wrappers/scikit_learn.py,KerasClassifier,predict_proba,#KerasClassifier#Any#,192

Before Change


                Class probability estimates.
        """
        kwargs = self.filter_sk_params(Sequential.predict_proba, kwargs)
        return self.model.predict_proba(X, **kwargs)

    def score(self, X, y, **kwargs):
        """Returns the mean accuracy on the given test data and labels.

After Change


                 will return "(n_samples, 2)"
        """
        kwargs = self.filter_sk_params(Sequential.predict_proba, kwargs)
        probs = self.model.predict_proba(X, **kwargs)

        // check if binary classification
        if probs.shape[1] == 1:
            // first column is probability of class 0 and second is of class 1
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 3

Instances


Project Name: keras-team/keras
Commit Name: b0d52d930aa00b7d0876abffe38e33d8a307b117
Time: 2016-06-07
Author: dalupus@gmail.com
File Name: keras/wrappers/scikit_learn.py
Class Name: KerasClassifier
Method Name: predict_proba


Project Name: ClimbsRocks/auto_ml
Commit Name: e68d9116efc3e2f1f86a4e46c09b8a13aece3788
Time: 2016-11-21
Author: ClimbsBytes@gmail.com
File Name: auto_ml/utils_model_training.py
Class Name: FinalModelATC
Method Name: predict_proba


Project Name: ClimbsRocks/auto_ml
Commit Name: 14ac31cc5d57a698f73ddc6b4f79630421e887c1
Time: 2017-07-05
Author: climbsbytes@gmail.com
File Name: auto_ml/utils_model_training.py
Class Name: FinalModelATC
Method Name: predict_proba