Skip to content

Commit

Permalink
Set accepts sparse tag to True (#893)
Browse files Browse the repository at this point in the history
  • Loading branch information
stanmart authored Jan 3, 2025
1 parent 84fdec6 commit 5a4325d
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/glum/_glm.py
Original file line number Diff line number Diff line change
Expand Up @@ -798,6 +798,11 @@ def __init__(
self.cat_missing_method = cat_missing_method
self.cat_missing_name = cat_missing_name

def __sklearn_tags__(self):
tags = super().__sklearn_tags__()
tags.input_tags.sparse = True
return tags

@property
def family_instance(self) -> ExponentialDispersionModel:
"""Return an :class:`~glum._distribution.ExponentialDispersionModel`."""
Expand Down

0 comments on commit 5a4325d

Please sign in to comment.