[mlpack-git] [mlpack/mlpack] Modeling LSH For Performance Tuning (#749)
notifications at github.com
Sat Aug 13 12:20:47 EDT 2016
> + // the arithmetic and geometric mean of distances from each anchor to its
> + // k-Nearest Neighbor.
> + // The geometric mean of N numbers is the Nth root of the product of the
> + // numbers. Through logarithmic properties though, this becomes computable
> + // through exponentiating the mean of the logarithms of x:
> + // exp(mean(log(x))) = geometricmean(x).
> + // Number of samples to create for modeling the Gamma Distributions
> + size_t regressionExamples = 50; // TODO: parameter?
> + // Number of points to use as queries.
> + size_t numAnchors = (size_t) std::round(0.1 * numSamples);
> + arma::mat queryMat = sampleSet.cols(0, numAnchors - 1);
> + // Evenly spaced sample sizes.
> + arma::Col<size_t> referenceSizes = arma::conv_to< arma::Col<size_t> >::from(
> + arma::linspace(numAnchors, numSamples - numAnchors - 1,
Can't you call linspace with `arma::Col<size_t>` as a template parameter so you can avoid the `conv_to`? I think that is possible.
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the mlpack-git