'Apply decision function to an array of samples.
Parameters
X : array-like, shape = [n_samples, n_features]
Array of samples (test vectors).
Returns
C : array, shape = [n_samples, n_classes] or [n_samples,]
Decision function values related to each class, per sample.
In the two-class case, the shape is [n_samples,], giving the
log likelihood ratio of the positive class.'

def decision_function(self, X):

    dec_func = self._decision_function(X)
    if (len(self.classes_) == 2):
        return (dec_func[:, 1] - dec_func[:, 0])
    return dec_func
