[mlpack-git] [mlpack/mlpack] Random projection trees (#726)
lozhnikov
notifications at github.com
Wed Aug 17 05:12:01 EDT 2016
> + RPTreeMeanSplit<BoundType, MatType>::GetRandomDirection(
> + splitInfo.direction);
> +
> + // Get the value according to which we will perform the split.
> + if (!GetSplitVal(data, begin, count, splitInfo.direction, splitInfo.splitVal))
> + return false;
> +
> + return true;
> +}
> +
> +template<typename BoundType, typename MatType>
> +typename MatType::elem_type RPTreeMaxSplit<BoundType, MatType>::
> +GetRandomDeviation(const MatType& data,
> + const size_t begin,
> + const size_t count,
> + const arma::Col<ElemType>& direction)
Yeah, I substituted that by
`math::Random((minimum - splitVal) * 0.75, + (maximum - splitVal) * 0.75);`
since I am not sure that the original algorithm guarantees that both children will not be empty.
--
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/ea66e5d17914460289974cc61f0669941edc2524#r75087858
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mailman.cc.gatech.edu/pipermail/mlpack-git/attachments/20160817/114f73c4/attachment-0001.html>
More information about the mlpack-git
mailing list