reset password
Author Message
ummata
Posts: 68
Posted 11:17 Feb 07, 2014 |

Hello all,
Is minimum value of fmin_bfgs zero, or it can be lower than that?
Also the number of iterations should be more than zero for correct answer?

Thank you.

msargent
Posts: 519
Posted 11:57 Feb 07, 2014 |

Are you looking at the value of the gradient when the call finished? It should be near zero (the function returns this value along with other values).

See http://docs.scipy.org/doc/scipy-0.7.x/reference/generated/scipy.optimize.fmin_bfgs.html

Last edited by msargent at 11:58 Feb 07, 2014.
ummata
Posts: 68
Posted 12:13 Feb 07, 2014 |

Yes, I got the value near zero after the call finished, but the number of iterations is zero.
But function and gradient evaluations are only one.

What I do which may cause the problem:
- Include theta zero to calculate cost and gradient.
- Store gradient for each theta in an array.
Other than that maybe wrong calculation in some functions

Thank you.


 

ummata
Posts: 68
Posted 14:16 Feb 07, 2014 |

I use about 8 features, what should be the number of iterations from using fmin_bfgs?