Mainly I have a problem with that is that the algorithm converges to good
effect, ie as a solution with a value next to zero.
To test the performance of the algorithm I used the following example:
def minimize (x):
min = x [0] + x [1] + x [2] + x [3]
return min
In which given a vector x would want to obtain the values of its elements that
when added give the minimum possible value.
To do this use the following function call:
solution = fmin (minimize, x0 = array ([1, 2, 3, 4]), args = "1", xtol = 0.21, =
0.21 ftol, full_output = 1)
print "value parameters", solution [0], "\ n"
and I get the following results:
Optimization terminated successfully.
Current function value: 10.000000
Iterations: 1
Function evaluations: 5
value of the parameters: [1. 2. 3. 4.]
As you can see the solution is VERY BAD, and I understand that due to large
values of ftol and xtol that I gave it converges very quickly and gives a
small value.
Now, for that is a better result, ie, better than the 10 found understand that I
must decrease and ftol xtol values, but in doing so I get:
"Warning: Maximum number of function evaluations exceeded Has Been."
Where I understand the algorithm before converging has made excessive calls to
the function "minimize".
Could you tell me what the correct use of the parameters ftol and xtol to find
a good minimum next to 0?. Sshould generally be used in subsequent cases of ftol
and xtol values?, They differ?.
A greeting and thank you very much.
_______________________________________________
SciPy-User mailing list
SciPy...@scipy.org
http://mail.scipy.org/mailman/listinfo/scipy-user
I understand that the problem will not converge naturally never, so if
you do not define convergence by high values ??of xtol and ftol fmin()
threw the warning that I mentioned having to evaluate the function
"minimize" excessive times.
Chiefly my question about the algorithm were two things, that defines
exactly the parameter ftol and xtol?, What is the difference between
them?, If I wanted to stop the algorithm when the minimum is not
differentiated from one iteration to the next in a given amount which
of these two parameters should have occasion to modify its default
value?.
Again thank you very much and sorry.
Warren Weckesser <warren.w...@enthought.com> escribió:
>> must decrease and ftol xtol values??, but in doing so I get:
>>
>>
>> "Warning: Maximum number of function evaluations exceeded Has Been."
>>
>> Where I understand the algorithm before converging has made excessive
>> calls to
>> the function "minimize".
>>
>> Could you tell me what the correct use of the parameters ftol and xtol to
>> find
>> a good minimum next to 0?. Sshould generally be used in subsequent cases
>> of ftol
>> and xtol values???, They differ?.
This function does not have a minimum.