[mlpack-git] [mlpack/mlpack] Universal B tree implementation (#746)
Ryan Curtin
notifications at github.com
Wed Aug 17 20:52:38 EDT 2016
> + for (size_t d = 0; d < dim; d++)
> + {
> + lower = loBound(d, i) - point[d];
> + higher = point[d] - hiBound(d, i);
> +
> + // Since only one of 'lower' or 'higher' is negative, if we add each's
> + // absolute value to itself and then sum those two, our result is the
> + // nonnegative half of the equation times two; then we raise to power Power.
> + sum += pow((lower + fabs(lower)) + (higher + fabs(higher)),
> + (ElemType) MetricType::Power);
> + }
> +
> + if (sum < minSum)
> + minSum = sum;
> + }
> +
So you have two different bounding structures, if I understand right: the minimum bounding hyperrectangle, and also the series of bounding rectangles defined by the minimum and maximum addresses. In some cases that minimum bounding hyperrectangle will be much tighter than the series of bounding rectangles, so I wonder: you might get better performance if this function took the max of the minimum distances to the series of bounding rectangles and to the minimum bounding rectangle. (The same applies to the other bounding functions too.)
--
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/746/files/8c5a97dcb1641ae6c98edc70426fb19f5cd7cb79#r75233646
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mailman.cc.gatech.edu/pipermail/mlpack-git/attachments/20160817/2832e7eb/attachment.html>
More information about the mlpack-git
mailing list