[mlpack-git] [mlpack] Warn if ratings of 0 are found (#376)

Ryan Curtin notifications at github.com
Mon Jan 12 11:14:38 EST 2015


We don't have to ignore them; it is possible to create `arma::sp_mat` that contains explicit zeroes; the call to the `sp_mat` constructor a few lines down may have the additional boolean parameters `sort_locations` and `check_for_zeros` (by default they are both true).

Most factorizers that work on `sp_mat` that are written sensibly will iterate over the "nonzero" elements in the `sp_mat` using the `sp_mat::const_iterator` class (and friends), which will include the zero elements if we set `check_for_zeros = false`.

So other options may include setting `check_for_zeros` to `false`, modifying the CF constructor to take `sort_locations` and `check_for_zeros` parameters, or taking the patch with warning as-is.  I wanted to see what you thought before proceeding, though.

(In the long run, I'd like to eliminate all instances of `locations`/`values` sparse matrix passing and just pass `sp_mat`, but that's a big task that should involve some benchmarking and speed testing too.)

---
Reply to this email directly or view it on GitHub:
https://github.com/mlpack/mlpack/pull/376#issuecomment-69594864
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mailman.cc.gatech.edu/pipermail/mlpack-git/attachments/20150112/24ac73dc/attachment.html>


More information about the mlpack-git mailing list