[mlpack-git] [mlpack/mlpack] Issue261/lsh test (#605)

Ryan Curtin notifications at github.com
Tue Apr 5 12:52:44 EDT 2016


>  
>  using namespace std;
>  using namespace mlpack;
>  using namespace mlpack::neighbor;
>  
> +double compute_recall(
> +    arma::Mat<size_t> LSHneighbors, 
> +    arma::Mat<size_t> groundTruth)
> +{
> +  const int n_queries = LSHneighbors.n_cols;
> +  const int n_neigh = LSHneighbors.n_rows;
> +
> +  int found_same = 0;
> +  for (int q = 0; q < n_queries; ++q)
> +  {
> +    for (int n = 0; n < n_neigh; ++n)

Another minor note: maybe better to use `size_t` here since these will never take negative values?

---
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/605/files/b0e5d740b4835ef4f65320d0dced2930a584bf53#r58574213
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mailman.cc.gatech.edu/pipermail/mlpack-git/attachments/20160405/35866a96/attachment.html>


More information about the mlpack-git mailing list