[mlpack-git] master: Very minor fixes. (fd4d759)
gitdub at mlpack.org
gitdub at mlpack.org
Wed Aug 17 09:30:42 EDT 2016
Repository : https://github.com/mlpack/mlpack
On branch : master
Link : https://github.com/mlpack/mlpack/compare/a7794bde8082c691553152393e1e230098f5e920...87776e52cf9ead63fa458118a0cfd2fe46b23466
>---------------------------------------------------------------
commit fd4d7592d0353dfe0b403f30ee3af7cad193c4a7
Author: Mikhail Lozhnikov <lozhnikovma at gmail.com>
Date: Wed Aug 17 16:30:42 2016 +0300
Very minor fixes.
>---------------------------------------------------------------
fd4d7592d0353dfe0b403f30ee3af7cad193c4a7
.../binary_space_tree/rp_tree_max_split_impl.hpp | 3 +--
.../tree/binary_space_tree/rp_tree_mean_split.hpp | 9 -------
.../binary_space_tree/rp_tree_mean_split_impl.hpp | 23 +-----------------
src/mlpack/core/tree/binary_space_tree/typedef.hpp | 2 +-
src/mlpack/methods/neighbor_search/kfn_main.cpp | 17 +++++++------
src/mlpack/methods/neighbor_search/knn_main.cpp | 17 +++++++------
src/mlpack/methods/neighbor_search/ns_model.hpp | 4 ++--
.../methods/neighbor_search/ns_model_impl.hpp | 12 +++++-----
.../methods/range_search/range_search_main.cpp | 17 +++++++------
src/mlpack/methods/range_search/rs_model.cpp | 28 +++++++++++-----------
src/mlpack/methods/range_search/rs_model.hpp | 4 ++--
src/mlpack/methods/range_search/rs_model_impl.hpp | 24 +++++++++----------
src/mlpack/tests/aknn_test.cpp | 8 +++----
src/mlpack/tests/knn_test.cpp | 8 +++----
src/mlpack/tests/range_search_test.cpp | 8 +++----
src/mlpack/tests/tree_test.cpp | 8 +++----
16 files changed, 79 insertions(+), 113 deletions(-)
diff --git a/src/mlpack/core/tree/binary_space_tree/rp_tree_max_split_impl.hpp b/src/mlpack/core/tree/binary_space_tree/rp_tree_max_split_impl.hpp
index 50f6a89..b187f99 100644
--- a/src/mlpack/core/tree/binary_space_tree/rp_tree_max_split_impl.hpp
+++ b/src/mlpack/core/tree/binary_space_tree/rp_tree_max_split_impl.hpp
@@ -24,8 +24,7 @@ bool RPTreeMaxSplit<BoundType, MatType>::SplitNode(const BoundType& /* bound */,
splitInfo.direction.zeros(data.n_rows);
// Get the normal to the hyperplane.
- RPTreeMeanSplit<BoundType, MatType>::GetRandomDirection(
- splitInfo.direction);
+ math::RandVector(splitInfo.direction);
// Get the value according to which we will perform the split.
if (!GetSplitVal(data, begin, count, splitInfo.direction, splitInfo.splitVal))
diff --git a/src/mlpack/core/tree/binary_space_tree/rp_tree_mean_split.hpp b/src/mlpack/core/tree/binary_space_tree/rp_tree_mean_split.hpp
index 93708ed..7c0a2dc 100644
--- a/src/mlpack/core/tree/binary_space_tree/rp_tree_mean_split.hpp
+++ b/src/mlpack/core/tree/binary_space_tree/rp_tree_mean_split.hpp
@@ -78,13 +78,6 @@ class RPTreeMeanSplit
private:
/**
- * Get a random unit vector of size direction.n_elem.
- *
- * @param direction The variable into which the method saves the vector.
- */
- static void GetRandomDirection(arma::Col<ElemType>& direction);
-
- /**
* Get the average distance between points in the dataset.
*
* @param data The dataset used by the binary space tree.
@@ -120,8 +113,6 @@ class RPTreeMeanSplit
const arma::uvec& samples,
arma::Col<ElemType>& mean,
ElemType& splitVal);
-
- friend RPTreeMaxSplit<BoundType, MatType>;
};
} // namespace tree
diff --git a/src/mlpack/core/tree/binary_space_tree/rp_tree_mean_split_impl.hpp b/src/mlpack/core/tree/binary_space_tree/rp_tree_mean_split_impl.hpp
index 14ebb53..1732ef4 100644
--- a/src/mlpack/core/tree/binary_space_tree/rp_tree_mean_split_impl.hpp
+++ b/src/mlpack/core/tree/binary_space_tree/rp_tree_mean_split_impl.hpp
@@ -40,7 +40,7 @@ bool RPTreeMeanSplit<BoundType, MatType>::SplitNode(const BoundType& bound,
splitInfo.direction.zeros(data.n_rows);
// Get a random normal vector.
- GetRandomDirection(splitInfo.direction);
+ math::RandVector(splitInfo.direction);
// Get the median value of the scalar products of the normal and the
// sampled points. The node will be split according to this value.
@@ -80,27 +80,6 @@ GetAveragePointDistance(
}
template<typename BoundType, typename MatType>
-void RPTreeMeanSplit<BoundType, MatType>::GetRandomDirection(
- arma::Col<ElemType>& direction)
-{
- direction.randu(); // Fill with [0, 1].
- direction -= 0.5; // Shift to [-0.5, 0.5].
-
- // Get the length of the vector.
- const ElemType norm = arma::norm(direction);
-
- if (norm == 0)
- {
- // If the vector is equal to 0, choose an arbitrary dimension.
- size_t k = math::RandInt(direction.n_rows);
-
- direction[k] = 1.0;
- }
- else
- direction /= norm; // Normalize the vector.
-}
-
-template<typename BoundType, typename MatType>
bool RPTreeMeanSplit<BoundType, MatType>::GetDotMedian(
const MatType& data,
const arma::uvec& samples,
diff --git a/src/mlpack/core/tree/binary_space_tree/typedef.hpp b/src/mlpack/core/tree/binary_space_tree/typedef.hpp
index 753ae15..74181ec 100644
--- a/src/mlpack/core/tree/binary_space_tree/typedef.hpp
+++ b/src/mlpack/core/tree/binary_space_tree/typedef.hpp
@@ -220,7 +220,7 @@ using VPTree = BinarySpaceTree<MetricType,
*/
template<typename MetricType, typename StatisticType, typename MatType>
-using MaxSplitRPTree = BinarySpaceTree<MetricType,
+using MaxRPTree = BinarySpaceTree<MetricType,
StatisticType,
MatType,
bound::HRectBound,
diff --git a/src/mlpack/methods/neighbor_search/kfn_main.cpp b/src/mlpack/methods/neighbor_search/kfn_main.cpp
index 34bc6ee..0a67344 100644
--- a/src/mlpack/methods/neighbor_search/kfn_main.cpp
+++ b/src/mlpack/methods/neighbor_search/kfn_main.cpp
@@ -61,9 +61,9 @@ PARAM_INT_IN("k", "Number of furthest neighbors to find.", "k", 0);
// The user may specify the type of tree to use, and a few pararmeters for tree
// building.
-PARAM_STRING_IN("tree_type", "Type of tree to use: 'kd', 'vp', 'rp-tree', "
- "'max-split-rp-tree', 'cover', 'r', 'r-star', 'x', 'ball', 'hilbert-r', "
- "'r-plus', 'r-plus-plus'.", "t", "kd");
+PARAM_STRING_IN("tree_type", "Type of tree to use: 'kd', 'vp', 'rp', 'max-rp', "
+ "'cover', 'r', 'r-star', 'x', 'ball', 'hilbert-r', 'r-plus', "
+ "'r-plus-plus'.", "t", "kd");
PARAM_INT_IN("leaf_size", "Leaf size for tree building (used for kd-trees, "
"vp trees, random projection trees, R trees, R* trees, X trees, "
"Hilbert R trees, R+ trees and R++ trees).", "l", 20);
@@ -197,15 +197,14 @@ int main(int argc, char *argv[])
tree = KFNModel::R_PLUS_PLUS_TREE;
else if (treeType == "vp")
tree = KFNModel::VP_TREE;
- else if (treeType == "rp-tree")
+ else if (treeType == "rp")
tree = KFNModel::RP_TREE;
- else if (treeType == "max-split-rp-tree")
- tree = KFNModel::MAX_SPLIT_RP_TREE;
+ else if (treeType == "max-rp")
+ tree = KFNModel::MAX_RP_TREE;
else
Log::Fatal << "Unknown tree type '" << treeType << "'; valid choices are "
- << "'kd', 'vp', 'rp-tree', 'max-split-rp-tree', 'cover', 'r', "
- << "'r-star', 'x', 'ball', 'hilbert-r', 'r-plus' and 'r-plus-plus'."
- << endl;
+ << "'kd', 'vp', 'rp', 'max-rp', 'cover', 'r', 'r-star', 'x', 'ball', "
+ << "'hilbert-r', 'r-plus' and 'r-plus-plus'." << endl;
kfn.TreeType() = tree;
kfn.RandomBasis() = randomBasis;
diff --git a/src/mlpack/methods/neighbor_search/knn_main.cpp b/src/mlpack/methods/neighbor_search/knn_main.cpp
index 5fa4c88..486a46f 100644
--- a/src/mlpack/methods/neighbor_search/knn_main.cpp
+++ b/src/mlpack/methods/neighbor_search/knn_main.cpp
@@ -63,9 +63,9 @@ PARAM_INT_IN("k", "Number of nearest neighbors to find.", "k", 0);
// The user may specify the type of tree to use, and a few parameters for tree
// building.
-PARAM_STRING_IN("tree_type", "Type of tree to use: 'kd', 'vp', 'rp-tree', "
- "'max-split-rp-tree', 'cover', 'r', 'r-star', 'x', 'ball', 'hilbert-r', "
- "'r-plus', 'r-plus-plus'.", "t", "kd");
+PARAM_STRING_IN("tree_type", "Type of tree to use: 'kd', 'vp', 'rp', 'max-rp', "
+ "'cover', 'r', 'r-star', 'x', 'ball', 'hilbert-r', 'r-plus', "
+ "'r-plus-plus'.", "t", "kd");
PARAM_INT_IN("leaf_size", "Leaf size for tree building (used for kd-trees, "
"vp trees, random projection trees, R trees, R* trees, X trees, "
"Hilbert R trees, R+ trees and R++ trees).", "l", 20);
@@ -183,15 +183,14 @@ int main(int argc, char *argv[])
tree = KNNModel::R_PLUS_PLUS_TREE;
else if (treeType == "vp")
tree = KNNModel::VP_TREE;
- else if (treeType == "rp-tree")
+ else if (treeType == "rp")
tree = KNNModel::RP_TREE;
- else if (treeType == "max-split-rp-tree")
- tree = KNNModel::MAX_SPLIT_RP_TREE;
+ else if (treeType == "max-rp")
+ tree = KNNModel::MAX_RP_TREE;
else
Log::Fatal << "Unknown tree type '" << treeType << "'; valid choices are "
- << "'kd', 'vp', 'rp-tree', 'max-split-rp-tree', 'cover', 'r', "
- << "'r-star', 'x', 'ball', 'hilbert-r', 'r-plus' and 'r-plus-plus'."
- << endl;
+ << "'kd', 'vp', 'rp', 'max-rp', 'cover', 'r', 'r-star', 'x', 'ball', "
+ << "'hilbert-r', 'r-plus' and 'r-plus-plus'." << endl;
knn.TreeType() = tree;
knn.RandomBasis() = randomBasis;
diff --git a/src/mlpack/methods/neighbor_search/ns_model.hpp b/src/mlpack/methods/neighbor_search/ns_model.hpp
index aeba1ea..5aece6b 100644
--- a/src/mlpack/methods/neighbor_search/ns_model.hpp
+++ b/src/mlpack/methods/neighbor_search/ns_model.hpp
@@ -259,7 +259,7 @@ class NSModel
R_PLUS_PLUS_TREE,
VP_TREE,
RP_TREE,
- MAX_SPLIT_RP_TREE
+ MAX_RP_TREE
};
private:
@@ -290,7 +290,7 @@ class NSModel
NSType<SortPolicy, tree::RPlusPlusTree>*,
NSType<SortPolicy, tree::VPTree>*,
NSType<SortPolicy, tree::RPTree>*,
- NSType<SortPolicy, tree::MaxSplitRPTree>*> nSearch;
+ NSType<SortPolicy, tree::MaxRPTree>*> nSearch;
public:
/**
diff --git a/src/mlpack/methods/neighbor_search/ns_model_impl.hpp b/src/mlpack/methods/neighbor_search/ns_model_impl.hpp
index d026cd1..46275f0 100644
--- a/src/mlpack/methods/neighbor_search/ns_model_impl.hpp
+++ b/src/mlpack/methods/neighbor_search/ns_model_impl.hpp
@@ -402,8 +402,8 @@ void NSModel<SortPolicy>::BuildModel(arma::mat&& referenceSet,
nSearch = new NSType<SortPolicy, tree::RPTree>(naive, singleMode,
epsilon);
break;
- case MAX_SPLIT_RP_TREE:
- nSearch = new NSType<SortPolicy, tree::MaxSplitRPTree>(naive, singleMode,
+ case MAX_RP_TREE:
+ nSearch = new NSType<SortPolicy, tree::MaxRPTree>(naive, singleMode,
epsilon);
break;
}
@@ -491,11 +491,11 @@ std::string NSModel<SortPolicy>::TreeName() const
case R_PLUS_PLUS_TREE:
return "R++ tree";
case VP_TREE:
- return "Vantage point tree";
+ return "vantage point tree";
case RP_TREE:
- return "Random projection tree (mean split)";
- case MAX_SPLIT_RP_TREE:
- return "Random projection tree (max split)";
+ return "random projection tree (mean split)";
+ case MAX_RP_TREE:
+ return "random projection tree (max split)";
default:
return "unknown tree";
}
diff --git a/src/mlpack/methods/range_search/range_search_main.cpp b/src/mlpack/methods/range_search/range_search_main.cpp
index ed79aa2..2505024 100644
--- a/src/mlpack/methods/range_search/range_search_main.cpp
+++ b/src/mlpack/methods/range_search/range_search_main.cpp
@@ -70,9 +70,9 @@ PARAM_DOUBLE_IN("min", "Lower bound in range.", "L", 0.0);
// The user may specify the type of tree to use, and a few parameters for tree
// building.
-PARAM_STRING_IN("tree_type", "Type of tree to use: 'kd', 'vp', 'rp-tree', "
- "'max-split-rp-tree', 'cover', 'r', 'r-star', 'x', 'ball', 'hilbert-r', "
- "'r-plus', 'r-plus-plus'.", "t", "kd");
+PARAM_STRING_IN("tree_type", "Type of tree to use: 'kd', 'vp', 'rp', 'max-rp', "
+ "'cover', 'r', 'r-star', 'x', 'ball', 'hilbert-r', 'r-plus', "
+ "'r-plus-plus'.", "t", "kd");
PARAM_INT_IN("leaf_size", "Leaf size for tree building (used for kd-trees, "
"vp trees, random projection trees, R trees, R* trees, X trees, "
"Hilbert R trees, R+ trees and R++ trees).", "l", 20);
@@ -185,15 +185,14 @@ int main(int argc, char *argv[])
tree = RSModel::R_PLUS_PLUS_TREE;
else if (treeType == "vp")
tree = RSModel::VP_TREE;
- else if (treeType == "rp-tree")
+ else if (treeType == "rp")
tree = RSModel::RP_TREE;
- else if (treeType == "max-split-rp-tree")
- tree = RSModel::MAX_SPLIT_RP_TREE;
+ else if (treeType == "max-rp")
+ tree = RSModel::MAX_RP_TREE;
else
Log::Fatal << "Unknown tree type '" << treeType << "; valid choices are "
- << "'kd', 'vp', 'rp-tree-max', 'rp-tree-mean', 'cover', 'r', "
- << "'r-star', 'x', 'ball', 'hilbert-r', 'r-plus' and 'r-plus-plus'."
- << endl;
+ << "'kd', 'vp', 'rp', 'max-rp', 'cover', 'r', 'r-star', 'x', 'ball', "
+ << "'hilbert-r', 'r-plus' and 'r-plus-plus'." << endl;
rs.TreeType() = tree;
rs.RandomBasis() = randomBasis;
diff --git a/src/mlpack/methods/range_search/rs_model.cpp b/src/mlpack/methods/range_search/rs_model.cpp
index d5d03f4..c926e4b 100644
--- a/src/mlpack/methods/range_search/rs_model.cpp
+++ b/src/mlpack/methods/range_search/rs_model.cpp
@@ -28,7 +28,7 @@ RSModel::RSModel(TreeTypes treeType, bool randomBasis) :
rPlusPlusTreeRS(NULL),
vpTreeRS(NULL),
rpTreeRS(NULL),
- maxSplitPRTreeRS(NULL)
+ maxPRTreeRS(NULL)
{
// Nothing to do.
}
@@ -154,8 +154,8 @@ void RSModel::BuildModel(arma::mat&& referenceSet,
singleMode);
break;
- case MAX_SPLIT_RP_TREE:
- maxSplitPRTreeRS = new RSType<tree::MaxSplitRPTree>(move(referenceSet),
+ case MAX_RP_TREE:
+ maxPRTreeRS = new RSType<tree::MaxRPTree>(move(referenceSet),
naive, singleMode);
break;
}
@@ -288,8 +288,8 @@ void RSModel::Search(arma::mat&& querySet,
rpTreeRS->Search(querySet, range, neighbors, distances);
break;
- case MAX_SPLIT_RP_TREE:
- maxSplitPRTreeRS->Search(querySet, range, neighbors, distances);
+ case MAX_RP_TREE:
+ maxPRTreeRS->Search(querySet, range, neighbors, distances);
break;
}
}
@@ -354,8 +354,8 @@ void RSModel::Search(const math::Range& range,
rpTreeRS->Search(range, neighbors, distances);
break;
- case MAX_SPLIT_RP_TREE:
- maxSplitPRTreeRS->Search(range, neighbors, distances);
+ case MAX_RP_TREE:
+ maxPRTreeRS->Search(range, neighbors, distances);
break;
}
}
@@ -384,11 +384,11 @@ std::string RSModel::TreeName() const
case R_PLUS_PLUS_TREE:
return "R++ tree";
case VP_TREE:
- return "Vantage point tree";
+ return "vantage point tree";
case RP_TREE:
- return "Random projection tree (mean split)";
- case MAX_SPLIT_RP_TREE:
- return "Random projection tree (max split)";
+ return "random projection tree (mean split)";
+ case MAX_RP_TREE:
+ return "random projection tree (max split)";
default:
return "unknown tree";
}
@@ -419,8 +419,8 @@ void RSModel::CleanMemory()
delete vpTreeRS;
if (rpTreeRS)
delete rpTreeRS;
- if (maxSplitPRTreeRS)
- delete maxSplitPRTreeRS;
+ if (maxPRTreeRS)
+ delete maxPRTreeRS;
kdTreeRS = NULL;
coverTreeRS = NULL;
@@ -433,5 +433,5 @@ void RSModel::CleanMemory()
rPlusPlusTreeRS = NULL;
vpTreeRS = NULL;
rpTreeRS = NULL;
- maxSplitPRTreeRS = NULL;
+ maxPRTreeRS = NULL;
}
diff --git a/src/mlpack/methods/range_search/rs_model.hpp b/src/mlpack/methods/range_search/rs_model.hpp
index 4c6f0db..a073968 100644
--- a/src/mlpack/methods/range_search/rs_model.hpp
+++ b/src/mlpack/methods/range_search/rs_model.hpp
@@ -35,7 +35,7 @@ class RSModel
R_PLUS_PLUS_TREE,
VP_TREE,
RP_TREE,
- MAX_SPLIT_RP_TREE
+ MAX_RP_TREE
};
private:
@@ -79,7 +79,7 @@ class RSModel
RSType<tree::RPTree>* rpTreeRS;
//! Random projection tree (max) based range search object
//! (NULL if not in use).
- RSType<tree::MaxSplitRPTree>* maxSplitPRTreeRS;
+ RSType<tree::MaxRPTree>* maxPRTreeRS;
public:
/**
diff --git a/src/mlpack/methods/range_search/rs_model_impl.hpp b/src/mlpack/methods/range_search/rs_model_impl.hpp
index 8ad93fe..183f599 100644
--- a/src/mlpack/methods/range_search/rs_model_impl.hpp
+++ b/src/mlpack/methods/range_search/rs_model_impl.hpp
@@ -74,8 +74,8 @@ void RSModel::Serialize(Archive& ar, const unsigned int /* version */)
ar & CreateNVP(rpTreeRS, "range_search_model");
break;
- case MAX_SPLIT_RP_TREE:
- ar & CreateNVP(maxSplitPRTreeRS, "range_search_model");
+ case MAX_RP_TREE:
+ ar & CreateNVP(maxPRTreeRS, "range_search_model");
break;
}
}
@@ -104,8 +104,8 @@ inline const arma::mat& RSModel::Dataset() const
return vpTreeRS->ReferenceSet();
else if (rpTreeRS)
return rpTreeRS->ReferenceSet();
- else if (maxSplitPRTreeRS)
- return maxSplitPRTreeRS->ReferenceSet();
+ else if (maxPRTreeRS)
+ return maxPRTreeRS->ReferenceSet();
throw std::runtime_error("no range search model initialized");
}
@@ -134,8 +134,8 @@ inline bool RSModel::SingleMode() const
return vpTreeRS->SingleMode();
else if (rpTreeRS)
return rpTreeRS->SingleMode();
- else if (maxSplitPRTreeRS)
- return maxSplitPRTreeRS->SingleMode();
+ else if (maxPRTreeRS)
+ return maxPRTreeRS->SingleMode();
throw std::runtime_error("no range search model initialized");
}
@@ -164,8 +164,8 @@ inline bool& RSModel::SingleMode()
return vpTreeRS->SingleMode();
else if (rpTreeRS)
return rpTreeRS->SingleMode();
- else if (maxSplitPRTreeRS)
- return maxSplitPRTreeRS->SingleMode();
+ else if (maxPRTreeRS)
+ return maxPRTreeRS->SingleMode();
throw std::runtime_error("no range search model initialized");
}
@@ -194,8 +194,8 @@ inline bool RSModel::Naive() const
return vpTreeRS->Naive();
else if (rpTreeRS)
return rpTreeRS->Naive();
- else if (maxSplitPRTreeRS)
- return maxSplitPRTreeRS->Naive();
+ else if (maxPRTreeRS)
+ return maxPRTreeRS->Naive();
throw std::runtime_error("no range search model initialized");
}
@@ -224,8 +224,8 @@ inline bool& RSModel::Naive()
return vpTreeRS->Naive();
else if (rpTreeRS)
return rpTreeRS->Naive();
- else if (maxSplitPRTreeRS)
- return maxSplitPRTreeRS->Naive();
+ else if (maxPRTreeRS)
+ return maxPRTreeRS->Naive();
throw std::runtime_error("no range search model initialized");
}
diff --git a/src/mlpack/tests/aknn_test.cpp b/src/mlpack/tests/aknn_test.cpp
index 8fbcaa8..740be0c 100644
--- a/src/mlpack/tests/aknn_test.cpp
+++ b/src/mlpack/tests/aknn_test.cpp
@@ -310,8 +310,8 @@ BOOST_AUTO_TEST_CASE(KNNModelTest)
models[19] = KNNModel(KNNModel::TreeTypes::VP_TREE, false);
models[20] = KNNModel(KNNModel::TreeTypes::RP_TREE, true);
models[21] = KNNModel(KNNModel::TreeTypes::RP_TREE, false);
- models[22] = KNNModel(KNNModel::TreeTypes::MAX_SPLIT_RP_TREE, true);
- models[23] = KNNModel(KNNModel::TreeTypes::MAX_SPLIT_RP_TREE, false);
+ models[22] = KNNModel(KNNModel::TreeTypes::MAX_RP_TREE, true);
+ models[23] = KNNModel(KNNModel::TreeTypes::MAX_RP_TREE, false);
for (size_t j = 0; j < 3; ++j)
{
@@ -385,8 +385,8 @@ BOOST_AUTO_TEST_CASE(KNNModelMonochromaticTest)
models[19] = KNNModel(KNNModel::TreeTypes::VP_TREE, false);
models[20] = KNNModel(KNNModel::TreeTypes::RP_TREE, true);
models[21] = KNNModel(KNNModel::TreeTypes::RP_TREE, false);
- models[22] = KNNModel(KNNModel::TreeTypes::MAX_SPLIT_RP_TREE, true);
- models[23] = KNNModel(KNNModel::TreeTypes::MAX_SPLIT_RP_TREE, false);
+ models[22] = KNNModel(KNNModel::TreeTypes::MAX_RP_TREE, true);
+ models[23] = KNNModel(KNNModel::TreeTypes::MAX_RP_TREE, false);
for (size_t j = 0; j < 2; ++j)
{
diff --git a/src/mlpack/tests/knn_test.cpp b/src/mlpack/tests/knn_test.cpp
index a5ce416..31d4dca 100644
--- a/src/mlpack/tests/knn_test.cpp
+++ b/src/mlpack/tests/knn_test.cpp
@@ -1000,8 +1000,8 @@ BOOST_AUTO_TEST_CASE(KNNModelTest)
models[19] = KNNModel(KNNModel::TreeTypes::VP_TREE, false);
models[20] = KNNModel(KNNModel::TreeTypes::RP_TREE, true);
models[21] = KNNModel(KNNModel::TreeTypes::RP_TREE, false);
- models[22] = KNNModel(KNNModel::TreeTypes::MAX_SPLIT_RP_TREE, true);
- models[23] = KNNModel(KNNModel::TreeTypes::MAX_SPLIT_RP_TREE, false);
+ models[22] = KNNModel(KNNModel::TreeTypes::MAX_RP_TREE, true);
+ models[23] = KNNModel(KNNModel::TreeTypes::MAX_RP_TREE, false);
for (size_t j = 0; j < 2; ++j)
{
@@ -1078,8 +1078,8 @@ BOOST_AUTO_TEST_CASE(KNNModelMonochromaticTest)
models[19] = KNNModel(KNNModel::TreeTypes::VP_TREE, false);
models[20] = KNNModel(KNNModel::TreeTypes::RP_TREE, true);
models[21] = KNNModel(KNNModel::TreeTypes::RP_TREE, false);
- models[22] = KNNModel(KNNModel::TreeTypes::MAX_SPLIT_RP_TREE, true);
- models[23] = KNNModel(KNNModel::TreeTypes::MAX_SPLIT_RP_TREE, false);
+ models[22] = KNNModel(KNNModel::TreeTypes::MAX_RP_TREE, true);
+ models[23] = KNNModel(KNNModel::TreeTypes::MAX_RP_TREE, false);
for (size_t j = 0; j < 2; ++j)
{
diff --git a/src/mlpack/tests/range_search_test.cpp b/src/mlpack/tests/range_search_test.cpp
index 6c39064..fcfa9eb 100644
--- a/src/mlpack/tests/range_search_test.cpp
+++ b/src/mlpack/tests/range_search_test.cpp
@@ -1272,8 +1272,8 @@ BOOST_AUTO_TEST_CASE(RSModelTest)
models[19] = RSModel(RSModel::TreeTypes::VP_TREE, false);
models[20] = RSModel(RSModel::TreeTypes::RP_TREE, true);
models[21] = RSModel(RSModel::TreeTypes::RP_TREE, false);
- models[22] = RSModel(RSModel::TreeTypes::MAX_SPLIT_RP_TREE, true);
- models[23] = RSModel(RSModel::TreeTypes::MAX_SPLIT_RP_TREE, false);
+ models[22] = RSModel(RSModel::TreeTypes::MAX_RP_TREE, true);
+ models[23] = RSModel(RSModel::TreeTypes::MAX_RP_TREE, false);
for (size_t j = 0; j < 2; ++j)
{
@@ -1354,8 +1354,8 @@ BOOST_AUTO_TEST_CASE(RSModelMonochromaticTest)
models[19] = RSModel(RSModel::TreeTypes::VP_TREE, false);
models[20] = RSModel(RSModel::TreeTypes::RP_TREE, true);
models[21] = RSModel(RSModel::TreeTypes::RP_TREE, false);
- models[22] = RSModel(RSModel::TreeTypes::MAX_SPLIT_RP_TREE, true);
- models[23] = RSModel(RSModel::TreeTypes::MAX_SPLIT_RP_TREE, false);
+ models[22] = RSModel(RSModel::TreeTypes::MAX_RP_TREE, true);
+ models[23] = RSModel(RSModel::TreeTypes::MAX_RP_TREE, false);
for (size_t j = 0; j < 2; ++j)
{
diff --git a/src/mlpack/tests/tree_test.cpp b/src/mlpack/tests/tree_test.cpp
index 9670048..8c0c936 100644
--- a/src/mlpack/tests/tree_test.cpp
+++ b/src/mlpack/tests/tree_test.cpp
@@ -1354,9 +1354,9 @@ BOOST_AUTO_TEST_CASE(KdTreeTest)
TreeType root(dataset);
}
-BOOST_AUTO_TEST_CASE(MaxSplitRPTreeTest)
+BOOST_AUTO_TEST_CASE(MaxRPTreeTest)
{
- typedef MaxSplitRPTree<EuclideanDistance, EmptyStatistic, arma::mat> TreeType;
+ typedef MaxRPTree<EuclideanDistance, EmptyStatistic, arma::mat> TreeType;
size_t maxRuns = 10; // Ten total tests.
size_t pointIncrements = 1000; // Range is from 2000 points to 11000.
@@ -1486,9 +1486,9 @@ void CheckMaxRPTreeSplit(const TreeType& tree)
CheckMaxRPTreeSplit(*tree.Right());
}
-BOOST_AUTO_TEST_CASE(MaxSplitRPTreeSplitTest)
+BOOST_AUTO_TEST_CASE(MaxRPTreeSplitTest)
{
- typedef MaxSplitRPTree<EuclideanDistance, EmptyStatistic, arma::mat> TreeType;
+ typedef MaxRPTree<EuclideanDistance, EmptyStatistic, arma::mat> TreeType;
arma::mat dataset;
dataset.randu(8, 1000);
TreeType root(dataset);
More information about the mlpack-git
mailing list