Skip to content

Comments

Fix estimator type#36

Merged
jonathan-taylor merged 7 commits intomainfrom
fix_estimator_type
Feb 3, 2026
Merged

Fix estimator type#36
jonathan-taylor merged 7 commits intomainfrom
fix_estimator_type

Conversation

@jonathan-taylor
Copy link
Collaborator

use of is_regressor/is_classifier functions instead of private attribute

Adds the `__sklearn_tags__` method to the `sklearn_sm` and `sklearn_selected` wrappers. This allows scikit-learn to correctly identify the estimator type (regressor or classifier) based on the statsmodels model.

This change enables the use of scikit-learn's cross-validation and model selection tools with these wrappers.

Tests have been added to verify that OLS and GLM Binomial models are correctly identified.
@jonathan-taylor
Copy link
Collaborator Author

this fail on params is fixed in #37

@jonathan-taylor jonathan-taylor merged commit 85853d2 into main Feb 3, 2026
0 of 6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant