Implemeted gradient descent optimizer. #792

Merged
merged 4 commits into from Oct 7, 2016

Projects

None yet

2 participants

@sumedhghaisas
Member

No description provided.

@sumedhghaisas sumedhghaisas Implemeted gradient descent optimizer.
6de69d7
+ double lastObjective = DBL_MAX;
+
+ // Now iterate!
+ arma::vec gradient(iterate.n_cols);
@rcurtin
rcurtin Sep 29, 2016 Member

This should be arma::mat not arma::vec, and you should use both the number of rows and columns to initialize it. Otherwise it will fail if we use an objective function that uses a 2-d matrix instead of a 1-d vector.

+ {
+ Log::Warn << "Gradient Descent: converged to " << overallObjective
+ << "; terminating" << " with failure. Try a smaller step size?"
+ << std::endl;
@rcurtin
rcurtin Sep 29, 2016 Member

Continued lines should be intended two tabs from the previous line, not one :)

@sumedhghaisas sumedhghaisas Minor bug fixes in Gradient Descent module
76198fe
@rcurtin
Member
rcurtin commented Sep 30, 2016

Once you fix the constructor to arma::mat so it compiles I think this is ready to merge. :)

@sumedhghaisas sumedhghaisas Minor fix in gradien descent
f8b2c15
@rcurtin
Member
rcurtin commented Oct 2, 2016

Ah I forgot, we should also add something to HISTORY.md to point out that we now have a gradient descent optimizer. :)

@sumedhghaisas sumedhghaisas Added Gradient Descent in HISTORY file
e6c39b3
@rcurtin rcurtin merged commit 5fd5395 into mlpack:master Oct 7, 2016

2 checks passed

continuous-integration/appveyor/pr AppVeyor build succeeded
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment