[mlpack-git] master: Make the Mahalanobis distance a true metric by default. (8a87c23)
gitdub at big.cc.gt.atl.ga.us
gitdub at big.cc.gt.atl.ga.us
Thu Mar 5 22:01:51 EST 2015
Repository : https://github.com/mlpack/mlpack
On branch : master
Link : https://github.com/mlpack/mlpack/compare/904762495c039e345beba14c1142fd719b3bd50e...f94823c800ad6f7266995c700b1b630d5ffdcf40
>---------------------------------------------------------------
commit 8a87c23ce000200fba777f378ad599a0d5243a75
Author: Ryan Curtin <ryan at ratml.org>
Date: Fri Oct 31 20:59:56 2014 +0000
Make the Mahalanobis distance a true metric by default.
>---------------------------------------------------------------
8a87c23ce000200fba777f378ad599a0d5243a75
src/mlpack/core/metrics/mahalanobis_distance.hpp | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/src/mlpack/core/metrics/mahalanobis_distance.hpp b/src/mlpack/core/metrics/mahalanobis_distance.hpp
index 99b4249..23518dd 100644
--- a/src/mlpack/core/metrics/mahalanobis_distance.hpp
+++ b/src/mlpack/core/metrics/mahalanobis_distance.hpp
@@ -40,9 +40,11 @@ namespace metric {
* which is faster to evaluate.
*
* @tparam TakeRoot If true, takes the root of the output. It is slightly
- * faster to leave this at the default of false.
+ * faster to leave this at the default of false, but this means the metric may
+ * not satisfy the triangle inequality and may not be usable for methods that
+ * expect a true metric.
*/
-template<bool TakeRoot = false>
+template<bool TakeRoot = true>
class MahalanobisDistance
{
public:
More information about the mlpack-git
mailing list