[mlpack-git] [mlpack] WIP: Refactor LRSDP to support more general linear constraints (#580)

Evan Patterson notifications at github.com
Thu Mar 17 14:17:30 EDT 2016


@rcurtin: Thanks for the comments. I'll make these changes. Also, I didn't know about the design guidelines. That's a helpful resource.

The reason for the complicated API is efficiency. Constraints of the same type are grouped together because it sometimes allow efficiency gains. For example, look at the current version of `GradientImpl` in LRSDP. In computing `L = 2*S*R`, it first computes `S` (involving all the constraints), then multiplies by `R`. If each individual constraint had its own gradient function, they would each have to multiply by `R`, leading to many unnecessary matrix multiplications. On the other hand, a different computation strategy is appropriate for low-rank matrices.

As for the evaluate functions, specializing to `EvaluateLR` is important because the matrix RR^T should really never be formed at all. (There are some TODOs in the current implementation to that effect.)  That said, at present there is no advantage to the grouping the evaluations, so I suppose I could separate out those for the individual constraints.

---
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/mlpack/mlpack/pull/580#issuecomment-198012347
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mailman.cc.gatech.edu/pipermail/mlpack-git/attachments/20160317/faf41208/attachment.html>


More information about the mlpack-git mailing list