[mlpack-git] [mlpack] add a wrapper for the matrix completion SDP (#374)
Ryan Curtin
notifications at github.com
Fri Jan 9 16:26:25 EST 2015
> +
> +MatrixCompletion::MatrixCompletion(const size_t m,
> + const size_t n,
> + const arma::umat& indices,
> + const arma::vec& values)
> + : m(m), n(n), indices(indices), values(values),
> + sdp(indices.n_cols, 0, CreateInitialPoint(m, n, DefaultRank(m, n, indices.n_cols)))
> +{
> + checkValues();
> + initSdp();
> +}
> +
> +void MatrixCompletion::checkValues()
> +{
> + if (indices.n_rows != 2)
> + Log::Fatal << "indices.n_rows != 2" << std::endl;
Can you make these error messages more descriptive? Should a user come up against this (say they are using CF or something), they're just going to see
```
[FATAL] indices.n_rows != 2
```
and confusion will reign forever. Probably `MatrixCompletion::MatrixCompletion(): matrix of indices for constraints does not have two rows.` or something similar will be better. Alternately, I am beginning to think that `Log::Fatal` calls should produce a backtrace, but I want to let the idea simmer more before opening an issue or doing something about it (getting backtraces is not always easy, and I don't think the code we have in place for `Log::Assert` is very robust).
---
Reply to this email directly or view it on GitHub:
https://github.com/mlpack/mlpack/pull/374/files#r22744211
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mailman.cc.gatech.edu/pipermail/mlpack-git/attachments/20150109/2f709acf/attachment.html>
More information about the mlpack-git
mailing list