[mlpack-git] master: Set a fake L2 error for the root node to avoid early termination. (1fdf726)

gitdub at mlpack.org gitdub at mlpack.org
Sun Aug 7 16:54:44 EDT 2016


Repository : https://github.com/mlpack/mlpack
On branch  : master
Link       : https://github.com/mlpack/mlpack/compare/b8de1faab0e58ff734dba4826c3a9607bcb6c84e...5bd1e7cf7e0cdc545fe06aef98ce1a1f051b976c

>---------------------------------------------------------------

commit 1fdf72666ef6f01fa1dc316bc64dbe6a78cf5c01
Author: Ryan Curtin <ryan at ratml.org>
Date:   Sun Aug 7 16:50:21 2016 -0400

    Set a fake L2 error for the root node to avoid early termination.


>---------------------------------------------------------------

1fdf72666ef6f01fa1dc316bc64dbe6a78cf5c01
 src/mlpack/core/tree/cosine_tree/cosine_tree.cpp | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/mlpack/core/tree/cosine_tree/cosine_tree.cpp b/src/mlpack/core/tree/cosine_tree/cosine_tree.cpp
index 2940608..6080d96 100644
--- a/src/mlpack/core/tree/cosine_tree/cosine_tree.cpp
+++ b/src/mlpack/core/tree/cosine_tree/cosine_tree.cpp
@@ -81,7 +81,7 @@ CosineTree::CosineTree(const arma::mat& dataset,
   // Define root node of the tree and add it to the queue.
   CosineTree root(dataset);
   arma::vec tempVector = arma::zeros(dataset.n_rows);
-  root.L2Error(0);
+  root.L2Error(-1.0); // We don't know what the error is.
   root.BasisVector(tempVector);
   treeQueue.push(&root);
 




More information about the mlpack-git mailing list