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

Add method to get best fitted model #44

Open
Permafacture opened this issue Oct 11, 2021 · 1 comment
Open

Add method to get best fitted model #44

Permafacture opened this issue Oct 11, 2021 · 1 comment

Comments

@Permafacture
Copy link

Permafacture commented Oct 11, 2021

It's awkward to actually get an instance of the best fitted model. Right now I've got to do:

    from scipy import stats
    ((name, params),) = fitter.get_best().items() 
    model = getattr(stats, name)(**params)

I think it would make more sense if the get_best actually returned the fitted model and some other method gave you the parameters. Look at the sklearn GridSearch where after calling fit, the fitter behaves as the best fitted model, and one can extract the best model and best params easily. https://scikit-learn.org/stable/modules/generated/sklearn.model_selection.GridSearchCV.html

@hgzhehe
Copy link

hgzhehe commented Apr 11, 2024

It really helps bro.
Now I can sample from the best fitted model
using
model.rvs(size=10)

There really should be some official way to pick an item base on some magical standard.

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

2 participants