Skip to content
This repository has been archived by the owner on May 21, 2024. It is now read-only.

Make the try_* functions into FitStatistic.grid_search methods? #42

Open
cdeil opened this issue May 11, 2013 · 5 comments
Open

Make the try_* functions into FitStatistic.grid_search methods? #42

cdeil opened this issue May 11, 2013 · 5 comments
Milestone

Comments

@cdeil
Copy link
Contributor

cdeil commented May 11, 2013

I just read through the tutorial and I think maybe one aspect of the probfit API could be improved.

At the moment there are try_uml and try_binlh functions that evaluate the unbinned or binned likelihood function for a grid of values and return the best result as a dict.

Wouldn't it be nicer to have a FitStatistic.grid_search(parameters) method?
(I didn't look if the different fit statistics, a.k.a. cost functions, have a base class, but that's what I mean with FitStatistic here, i.e. UnbinnnedLH and Chi2Regression and ...)

@piti118
Copy link
Contributor

piti118 commented May 13, 2013

I was gonna remove them though it's there since this thing is call distfit... Do you think they are useful? If so, yes it should be a method instead of a function.

@cdeil
Copy link
Contributor Author

cdeil commented May 13, 2013

Yes, I think having a grid_search method as well as a quick way to visualize model vs. data (and maybe residuals) to find good start values for MIGRAD and debug what the model is doing is very useful.
http://code.google.com/p/pyminuit/wiki/FunctionReference#scan((param,_bins,_low,_high),_...[,_corners[,_output]])

@piti118
Copy link
Contributor

piti118 commented May 14, 2013

Scan does something else though...

@piti118
Copy link
Contributor

piti118 commented May 14, 2013

Oh... it's pyminuit scan not minuit scan.

@cdeil
Copy link
Contributor Author

cdeil commented May 16, 2013

Related suggestion for improvement: the six functions fit_uml, try_uml, fit_binx2, try_chi2, fit_binlh and try_binlh in oneshot.py are not included in the [probfit docs]((http://iminuit.github.io/probfit/search.html?q=fit_uml)
Either remove them or add them to the docs.

If they are kept, I would suggest to make the fit_* methods simply return minuit instead of (fval, minuit), as fval is simply available as minuit.fval, right?

@cdeil cdeil added this to the wishlist milestone Oct 21, 2016
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants