Is there a way to implement a generalized linear model to classification problems in sklearn? Since there isn't a classification class for that I thought of applying a sigmoid function to regression results. Is there an easy way to do it with sklearn?
I've tried stacking but StackingClassifier
does not support regressors as estimators.
glm = TweedieRegressor()
logit = LogisticRegression(penalty = 'none')
GLM_logistic = StackingClassifier(estimators = [('glm', glm)], final_estimator = logit)
GLM_logistic.fit(X, y)
This gives
ValueError: The estimator TweedieRegressor should be a classifier.