'Decision function of the linear model
Parameters
X : numpy array or scipy.sparse matrix of shape (n_samples, n_features)
Returns
T : array, shape (n_samples,)
The predicted decision function'

def _decision_function(self, X):

    check_is_fitted(self, 'n_iter_')
    if sparse.isspmatrix(X):
        return (safe_sparse_dot(X, self.coef_.T, dense_output=True) + self.intercept_)
    else:
        return super(ElasticNet, self)._decision_function(X)
