I'm having trouble using the leastsq optimisation function, could anyone help me ?
I have a list of drillings, each one whith its own parameters. All this parameters are concatenated in the array called VARIABLES
the dictionnary dico_taille_variable associate to each drillings the size of the its vetcor "parameters" in order to deconcatenate the VARIABLES array and apply a function calculating the residuals of each drilling in the function residuals_global that I'm trying to optimize.
Residual_global calls the function residuals which is in a Class Drilling and has this aspect :
I didn't see any other responses to your question, so I'll try.
Though the error messages you're getting aren't very helpful, I
believe the basic issue is that you're expecting several global
variables to be accessible in your objective function
residual_global(). I would recommend that you instead add
dico_taille_variable as a keyword argument to residual_global, and
pass that in with
Also, in your objective function it wasn't clear how 'D.residuals()'
and D.retresi was supposed to be found. I think you may want to pass
in a list or dictionary of the individual instances of your Drilling