[mlpack-git] [mlpack/mlpack] Implementation of Multiprobe LSH (#691)

Ryan Curtin notifications at github.com
Mon Jun 27 15:58:02 EDT 2016


> +
> +  // Calculate scores. score = distance^2.
> +  arma::vec scores(2 * numProj);
> +  scores.rows(0, numProj - 1) = arma::pow(limLow, 2);
> +  scores.rows(numProj, (2 * numProj) - 1) = arma::pow(limHigh, 2);
> +
> +  // Actions vector describes what perturbation (-1/+1) corresponds to a score.
> +  arma::Col<short int> actions(2 * numProj); // will be [-1 ... 1 ...]
> +  actions.rows(0, numProj - 1) = // first numProj rows
> +    -1 * arma::ones< arma::Col<short int> > (numProj); // -1s
> +  actions.rows(numProj, (2 * numProj) - 1) = // last numProj rows
> +    arma::ones< arma::Col<short int> > (numProj); // 1s
> +
> +
> +  // Acting dimension vector shows which coordinate to transform according to
> +  // actions described by actions vector

I always feel so pedantic writing this, but can you finish the sentence with a period?  I think it's important to have complete sentences in documentation for clarity, so that people for whom English isn't the first language can have a better understanding.

---
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/691/files/71eda99e207a9b91581504e11a9e14d38838bc9f#r68644749
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mailman.cc.gatech.edu/pipermail/mlpack-git/attachments/20160627/b16dbcf0/attachment.html>


More information about the mlpack-git mailing list