[mlpack-git] [mlpack/mlpack] Approximate Neighbor Search for Dual tree algorithms. (#684)
Ryan Curtin
notifications at github.com
Fri Jun 10 09:25:23 EDT 2016
> @@ -150,6 +150,21 @@ class NearestNeighborSort
> return DBL_MAX;
> return a + b;
> }
> +
> + /**
> + * Return the given value relaxed.
> + *
> + * @param value Value to relax.
> + * @param epsilon Relative error (non-negative).
> + *
> + * @return double Value relaxed.
> + */
> + static inline double Relax(const double value, const double epsilon)
> + {
> + if (value == DBL_MAX)
> + return DBL_MAX;
> + return (1 / (1 + epsilon)) * value;
Shouldn't this be `(1 + epsilon)`? If I want to find an e=1.0-approximate furthest neighbor this means I am willing to accept a neighbor with half the distance from the query point as the true furthest neighbor. But this formula seems to imply that with e=1.0 I could get arbitrary amounts of approximation.
---
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/684/files/07879a2cc79b35b10d7fae687d6e27ad90a9f2d7#r66611928
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mailman.cc.gatech.edu/pipermail/mlpack-git/attachments/20160610/e5ac1c51/attachment-0001.html>
More information about the mlpack-git
mailing list