[mlpack-git] [mlpack/mlpack] Random projection trees (#726)
notifications at github.com
Tue Aug 16 16:55:51 EDT 2016
> + // Find the median of scalar products of the samples and the normal vector.
> + for (size_t k = 0; k < samples.n_elem; k++)
> + values[k] = arma::dot(data.col(samples[k]), direction);
> + const ElemType maximum = arma::max(values);
> + const ElemType minimum = arma::min(values);
> + if (minimum == maximum)
> + return false;
> + splitVal = arma::median(values);
> + // Add a random deviation to the median.
> + // This algorithm differs from the method suggested in the
> + // random projection tree paper.
> + splitVal += math::Random((minimum - splitVal) * 0.75,
> + (maximum - splitVal) * 0.75);
Other than the clear speed improvement, why did you choose to go with this simpler approach? I am not sure it will still satisfy the theoretical guarantees given by the paper (I have not spent a huge amount of time thinking about the necessary conditions for that).
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