I have inherited some code that is trying to minimize a function using scipy.optimize.minimize
. I am having trouble understanding some of the inputs to the fun
and jac
arguments
The call to minimize looks something like this:
result = minimize(func, jac=jac_func, args=(D_neg, D, C), method = 'TNC' ...other arguments)
func
looks like the following:
def func(G, D_neg, D, C):
#do stuff
jac_func
has the following structure:
def jac_func(G, D_neg, D, C):
#do stuff
What I don't understand is where the G
input to func
and jac_func
is coming from. Is that somehow specified in the minimize
function, or by the fact that the method
is specified as TNC
? I've tried to do some research into the structure of this optimization function but I'm having trouble finding the answer I need. Any help is greatly appreciated
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…