[mlpack-git] [mlpack] CF should avoid calculating full matrix when providing recommendations (#406)

Ryan Curtin notifications at github.com
Wed Mar 25 18:11:05 EDT 2015


d(X.col(i), X.col(j)) = d(W H.col(i), W H.col(j)).

For the L2 distance (which is fine for now), we can show that this is the Mahalanobis distance with M^{-1} = W^T W.  Decompose M^{-1} = L L^T (Cholesky decomposition), and then multiply H by L^T to obtain H' (this takes O(r^2 n) time).  Then, once this is done,

d(X.col(i), X.col(j)) = d(H'.col(i), H'.col(j))

and each distance calculation takes only O(r) time.  We can use simple nearest neighbor search out of the box on H', then.

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


More information about the mlpack-git mailing list