[mlpack-svn] r17455 - in mlpack/tags/mlpack-1.0.11: . src/mlpack/core/metrics
fastlab-svn at coffeetalk-1.cc.gatech.edu
fastlab-svn at coffeetalk-1.cc.gatech.edu
Sun Dec 7 14:21:10 EST 2014
Author: rcurtin
Date: Sun Dec 7 14:21:09 2014
New Revision: 17455
Log:
Backport r17274.
Modified:
mlpack/tags/mlpack-1.0.11/ (props changed)
mlpack/tags/mlpack-1.0.11/HISTORY.txt
mlpack/tags/mlpack-1.0.11/src/mlpack/core/metrics/mahalanobis_distance.hpp
Modified: mlpack/tags/mlpack-1.0.11/HISTORY.txt
==============================================================================
--- mlpack/tags/mlpack-1.0.11/HISTORY.txt (original)
+++ mlpack/tags/mlpack-1.0.11/HISTORY.txt Sun Dec 7 14:21:09 2014
@@ -8,6 +8,9 @@
* Add support for observation weights to LinearRegression.
+ * MahalanobisDistance<> now takes root of the distance by default and
+ therefore satisfies the triangle inequality (TakeRoot now defaults to true).
+
2014-08-29 mlpack 1.0.10
* Bugfix for NeighborSearch regression which caused very slow allknn/allkfn.
Modified: mlpack/tags/mlpack-1.0.11/src/mlpack/core/metrics/mahalanobis_distance.hpp
==============================================================================
--- mlpack/tags/mlpack-1.0.11/src/mlpack/core/metrics/mahalanobis_distance.hpp (original)
+++ mlpack/tags/mlpack-1.0.11/src/mlpack/core/metrics/mahalanobis_distance.hpp Sun Dec 7 14:21:09 2014
@@ -55,9 +55,11 @@
* 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-svn
mailing list