'Perform classification on test vectors X.
Parameters
X : {array-like, sparse matrix}, shape = [n_samples, n_features]
Input vectors, where n_samples is the number of samples
and n_features is the number of features.
Returns
y : array, shape = [n_samples]  or [n_samples, n_outputs]
Predicted target values for X.'

def predict(self, X):

    check_is_fitted(self, 'constant_')
    X = check_array(X, accept_sparse=['csr', 'csc', 'coo'], force_all_finite=False)
    n_samples = X.shape[0]
    y = (np.ones((n_samples, 1)) * self.constant_)
    if ((self.n_outputs_ == 1) and (not self.output_2d_)):
        y = np.ravel(y)
    return y
