[mlpack-git] [mlpack/mlpack] Random projection trees (#726)
Ryan Curtin
notifications at github.com
Fri Aug 5 10:17:50 EDT 2016
> + arma::uvec& distinctSamples,
> + const size_t begin,
> + const size_t count,
> + const size_t numSamples)
> +{
> + arma::Col<size_t> samples;
> +
> + samples.zeros(count);
> +
> + for (size_t i = 0; i < numSamples; i++)
> + samples [ (size_t) math::RandInt(count) ]++;
> +
> + distinctSamples = arma::find(samples > 0);
> +
> + distinctSamples += begin;
> +}
I think we talked in another PR or somewhere else about creating a general `GetDistinctSamples` function and putting it in `src/mlpack/core/` somewhere. Or was that @mentekid I talked about that with? I can't remember :(
---
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/726/files/e14a26f3e209af0608cb61ecaa5e30f253e72e9b#r73699242
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mailman.cc.gatech.edu/pipermail/mlpack-git/attachments/20160805/37402c9d/attachment.html>
More information about the mlpack-git
mailing list