fminunc alternate in numpy
Is their an alternate of fminunc function(in octave) in python. I have a
cost function for a binary classifier. Now I want to run gradient descent
to get minimum value of theta. The octave implementation will look like
this.
% Set options for fminunc
options = optimset('GradObj', 'on', 'MaxIter', 400);
% Run fminunc to obtain the optimal theta
% This function will return theta and the cost
[theta, cost] = ...
fminunc(@(t)(costFunction(t, X, y)), initial_theta, options);
I have converted my costFunction in python using numpy library, and
looking for the fminunc or any other gradient descent algorithm
implementation in numpy.
No comments:
Post a Comment