[mlpack-git] [mlpack] Add a primal-dual interior point SDP solver (#387)

Stephen Tu notifications at github.com
Wed Jan 21 16:34:17 EST 2015


> Why provide N2Bar()? The SDP class doesn't actually use it.

It is used by `PrimalDualSolver::Optimize`

> I don't know that I agree with storing both a sparse and dense objective. I'd actually lean towards templatizing SDP so you get SDP<ObjectiveMatrixType> or something. This will accelerate code in the solver because you won't have to check if there is a sparse or dense objective. (A smart compiler could actually figure that out at compile time fairly easily, but I'm not sure that gcc actually will.)

I'm starting to agree with this, after having written the solver to deal with both. I don't think I've seen a situation yet where we needed both. I think I'll go ahead and template it out. 

> Optimize() returns a std::pair<bool, double>. The bool is the success indicator and the double is the objective. Other optimizers just return the final objective, though. It seems like false is only returned when the solver does not converge in the specified number of iterations. I'm not sure any higher-level code will ever use that information, though, so I don't know how useful it is to return both a bool and a double as opposed to just the objective value.

Honestly, I wrote this for the tests. Basically, since the primal dual method here is unique in that it is able to certify its own optimality, I wanted the test cases to be able to have access to this information. What API would you prefer for communicating this? I'd like to avoid having to write the KKT conditions out for each test case. We could write a free function (something like `CheckKKT`) locally for the test cases. 

> line 203: rd = - sz - Asparse.t() * ...: is that a typo? It's odd to see a negative sign separated from the argument like that, so I just wanted to check.

It's not a typo, but this weirdness will go away once I templatize. 

---
Reply to this email directly or view it on GitHub:
https://github.com/mlpack/mlpack/issues/387#issuecomment-70926232
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mailman.cc.gatech.edu/pipermail/mlpack-git/attachments/20150121/244ba82d/attachment.html>


More information about the mlpack-git mailing list