cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Community Tip - When posting, your subject should be specific and summarize your question. Here are some additional tips on asking a great question. X

More than 9 parameters in genfit

tfetter
7-Bedrock

More than 9 parameters in genfit

I would like to use genfit to fit a function with more than 9 parameters, and its not clear to me how to do that. 

 

The web description page for genfit says:

 
• vx, vy are vectors of real data values of the same length, corresponding to the x and y values in the data set. There must be at least as many data points as parameters.
• vg is an n element vector of guess values for the parameters. If n = 1, then vg is a scalar.
F(x, u) is a fitting function, or a vector of functions, where x is the independent variable and u is either a vector of parameters or individual parameter names. The following equation is both a valid representation for a fitting function:

• n is a positive integer. In the case of non-vectorized parameters, there is a limit of nine individual names.

 

For 9 or fewer parameters, just including the parameters in the fitting function definition as F(x, u1,u2,u3,...):= works fine.  But assigning the parameter names to a vector when there are more than 9 and using that vector name in the fitting function definition as F(x, params) where params is a vector of u1,u2,u3,... does not work. 

 

Does anyone have an expample of setting up genfit for a function with more than 9 parameters?

 

Thanks

2 REPLIES 2


But assigning the parameter names to a vector when there are more than 9 and using that vector name in the fitting function definition as F(x, params) where params is a vector of u1,u2,u3,... does not work. 

That seems to be the cause for your attempts failing. If you use a vector params, you have to use params[0, params]1 etc. in the function definition.

 

Here is a quick example with 11 parameters:

Werner_E_2-1639174605702.png

 

Yes - that makes perfect sense once you see the form

 

Thanks so much!

Top Tags