'Returns class probability estimates for the given test data.
# Arguments
x: array-like, shape `(n_samples, n_features)`
Test samples where n_samples in the number of samples
and n_features is the number of features.
**kwargs: dictionary arguments
Legal arguments are the arguments
of `Sequential.predict_classes`.
# Returns
proba: array-like, shape `(n_samples, n_outputs)`
Class probability estimates.
In the case of binary classification,
tp match the scikit-learn API,
will return an array of shape \'(n_samples, 2)\'
(instead of `(n_sample, 1)` as in Keras).'

def predict_proba(self, x, **kwargs):

    kwargs = self.filter_sk_params(Sequential.predict_proba, kwargs)
    probs = self.model.predict_proba(x, **kwargs)
    if (probs.shape[1] == 1):
        probs = np.hstack([(1 - probs), probs])
    return probs
