[mlpack-git] [mlpack/mlpack] Vantage point tree (#708)

Ryan Curtin notifications at github.com
Thu Jul 21 19:29:17 EDT 2016


> +   */
> +  static void SelectVantagePoint(const BoundType& bound, const MatType& data,
> +    const size_t begin, const size_t count, size_t& vantagePoint, ElemType& mu);
> +
> +  /**
> +   * Find no more then max(numSamples, upperBound) random samples i.e.
> +   * random points that belong to the node. Each sample belongs to
> +   * the interval [begin, begin + upperBound)
> +   *
> +   * @param distinctSamples The vector of samples indices.
> +   * @param numSamples Maximum number of samples.
> +   * @param begin The least index.
> +   * @param upperBound The upper bound of indices.
> +   */
> +  static void GetDistinctSamples(arma::uvec& distinctSamples,
> +      const size_t numSamples, const size_t begin, const size_t upperBound);

This has a lot of similarities to `ObtainDistinctSamples()` from `mlpack/methods/rann/ra_util.hpp`.  Do you think we should take that function, combine it with this one (I think your version is more flexible), put it in `core/math/`, and refactor both pieces to use that code?

---
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/708/files/300882ac96e7a663e3e303ca0c45c14c6fafe1a6#r71805776
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mailman.cc.gatech.edu/pipermail/mlpack-git/attachments/20160721/ad5bb8ee/attachment.html>


More information about the mlpack-git mailing list