[mlpack-git] [mlpack/mlpack] Random projection trees (#726)

lozhnikov notifications at github.com
Fri Aug 5 10:56:28 EDT 2016


> +
> +template<typename BoundType, typename MatType>
> +bool RPTreeMeanSplit<BoundType, MatType>::GetMeanMedian(
> +    const MatType& data,
> +    const arma::uvec& samples,
> +    arma::Col<ElemType>& mean,
> +    ElemType& splitVal)
> +{
> +  std::vector<ElemType> values(samples.n_elem);
> +
> +  mean.zeros(data.n_rows);
> +
> +  for (size_t k = 0; k < samples.n_elem; k++)
> +    mean += data.col(samples[k]);
> +
> +  mean /= samples.n_elem;

okay, I'll look through the armadillo 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/726/files/e14a26f3e209af0608cb61ecaa5e30f253e72e9b#r73705711
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mailman.cc.gatech.edu/pipermail/mlpack-git/attachments/20160805/f9295fec/attachment-0001.html>


More information about the mlpack-git mailing list