'Predict classes for X.
The predicted class of an input sample is computed as the weighted mean
prediction of the classifiers in the ensemble.
Parameters
X : {array-like, sparse matrix} of shape = [n_samples, n_features]
The training input samples. Sparse matrix can be CSC, CSR, COO,
DOK, or LIL. DOK and LIL are converted to CSR.
Returns
y : array of shape = [n_samples]
The predicted classes.'

def predict(self, X):

    pred = self.decision_function(X)
    if (self.n_classes_ == 2):
        return self.classes_.take((pred > 0), axis=0)
    return self.classes_.take(np.argmax(pred, axis=1), axis=0)
