Skip to content

Write RooGaussMinimizer[Fcn] #6

Closed

Description

@egpbos

Mainly fill out the DoEval with an explicit Gaussian NLL, i.e. something like 0.5*pow((x-mu)/sigma,2) + log(gauss-normalization) and DoDerivative with the derivatives of this to mu and sigma, depending on the index argument.

Activity

  1. egpbos commented on Aug 31, 2017

    @egpbos
    MemberAuthor

    Note that the gauss-normalization term (1/sqrt(something pi sigma^something)) contains sigma, so it doesn't drop out in the derivative to sigma.

  2. vincecr0ft commented on Sep 19, 2017

    @vincecr0ft
    Member

    Re-added migrad functionality in RooGaussMinimizer together with print statements in RooGaussMinimizerFcn. Only DoEval() is called and never DoDerivative() The RooGaussMinimizer just calls the Minuit function which should be overloaded to take a gradient function. Is this recast back to an IMultiGenFunction somewhere?

  3. egpbos commented on Sep 20, 2017

    @egpbos
    MemberAuthor

    So, when you initialize the Fitter with a IMultiGradFunction, it should set the fUseGradient flag to kTRUE.

    As you say, RooGaussMinimizer::migrad calls Fitter::fitFcn, which calls Fitter::DoMinimization. I don't know if this makes use of fUseGradient. I don't think it will, since it in turn calls Minuit2 things. Minuit2 is an implementation of the Minimizer interface class and the Minimizer class does provide for IMultiGradFunction overloads. However, the question is whether these will be called from the current RooGaussMinimizer

    If all of this doesn't work out, we could try to write some custom fitting routine. We can take some inspiration from Fitter::DoBinnedLikelihoodFit and Fitter::DoLeastSquareFit, where fUseGradient is used.

    Todo:

    • Check whether fUseGradient is kTRUE after initialization of the Fitter in the RooGaussMinimizer.
    • Make sure the IMultiGradFunction Minuit2 functions are called, not the IMultiGenFunction ones.
      • If not: make it so that it does :)
      • If it does: find out why DoDerivative is not called; should we overload something else as well?
  4. vincecr0ft commented on Sep 27, 2017

    @vincecr0ft
    Member

    I think we just need testing now and therefore this can be closed...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions