Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

sklearn compliance and default subestimator #3

Open
Peter9192 opened this issue Jan 25, 2024 · 0 comments
Open

sklearn compliance and default subestimator #3

Peter9192 opened this issue Jan 25, 2024 · 0 comments

Comments

@Peter9192
Copy link

In checking sklearn compliance, it complains about the fixed-effects model as input, even though this very similar to the documented example (under get_params).

Not sure if this is a bad idea, or whether the checks are too strict. See scikit-learn/scikit-learn#28257

An alternative could be to have a dynamic class generator. Something like this:

def create_mixed_effects_model(Model):
    """Create a mixed-effects model with Model as fixed-effects model."""
    class_name = "MixedEffects" + Model.__name__
    class_dict = dict(fe_model = Model)
    new_class = type(class_name, (MixedEffectsModel,), class_dict)
    return new_class

However, this would not be in line with the documented example for get_params.

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

No branches or pull requests

1 participant