[mlpack-git] [mlpack] add a wrapper for the matrix completion SDP (#374)

Stephen Tu notifications at github.com
Fri Jan 9 16:53:20 EST 2015


> +   * Construct a matrix completion problem, specifying the maximum rank of the
> +   * solution.
> +   *
> +   * @param m Number of rows of original matrix.
> +   * @param n Number of columns of original matrix.
> +   * @param indices Matrix containing the indices of the known entries (must be
> +   *    [2 x p]).
> +   * @param values Vector containing the values of the known entries (must be
> +   *    length p).
> +   * @param r Maximum rank of solution.
> +   */
> +  MatrixCompletion(const size_t m,
> +                   const size_t n,
> +                   const arma::umat& indices,
> +                   const arma::vec& values,
> +                   const size_t r);

I like the idea of `arma::sp_mat`. However, it does leave open the following ambiguity: what if i want a particular entry (i, j) to be zero? How do i distinguish this from the case where I don't know the value of entry (i, j). The only way seems to be to force us to break the abstraction of a sparse matrix. Sure, I could say something like `X(i, j) = 0` explicitly, but what if the particular setter implementation does `if (value == 0) return;`?

Alternatively, you could have the semantic that the `sp_mat` constructor doesn't the constraint that a particular entry is zero, but then you push the burden onto API callers to determine if this is the case for their data. 

---
Reply to this email directly or view it on GitHub:
https://github.com/mlpack/mlpack/pull/374/files#r22745947
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mailman.cc.gatech.edu/pipermail/mlpack-git/attachments/20150109/cd4852d4/attachment.html>


More information about the mlpack-git mailing list