[mlpack-svn] r16523 - mlpack/trunk/src/mlpack/core/tree/binary_space_tree
fastlab-svn at coffeetalk-1.cc.gatech.edu
fastlab-svn at coffeetalk-1.cc.gatech.edu
Tue May 20 14:34:32 EDT 2014
Author: rcurtin
Date: Tue May 20 14:34:32 2014
New Revision: 16523
Log:
It turns out the implementation of FurthestPointDistance() was just wrong.
Thanks Andrew for pointing it out.
Modified:
mlpack/trunk/src/mlpack/core/tree/binary_space_tree/binary_space_tree_impl.hpp
Modified: mlpack/trunk/src/mlpack/core/tree/binary_space_tree/binary_space_tree_impl.hpp
==============================================================================
--- mlpack/trunk/src/mlpack/core/tree/binary_space_tree/binary_space_tree_impl.hpp (original)
+++ mlpack/trunk/src/mlpack/core/tree/binary_space_tree/binary_space_tree_impl.hpp Tue May 20 14:34:32 2014
@@ -438,12 +438,12 @@
inline double BinarySpaceTree<BoundType, StatisticType, MatType, SplitType>::
FurthestPointDistance() const
{
- if (IsLeaf())
+ if (!IsLeaf())
return 0.0;
// Otherwise half of the maximum bound distance is sufficient (this is the
// distance from a corner of the bound to the centroid).
- return bound.MaxDistance(bound);
+ return 0.5 * bound.MaxDistance(bound);
}
/**
@@ -681,7 +681,7 @@
convert << " Split dimension: " << splitDimension << std::endl;
// How many levels should we print? This will print the top two tree levels.
- if (left != NULL && parent == NULL)
+ if (left != NULL && parent == NULL)
{
convert << " Left child:" << std::endl;
convert << mlpack::util::Indent(left->ToString(), 2);
More information about the mlpack-svn
mailing list