[mlpack-svn] r14246 - in mlpack/branches/mlpack-1.x/src/mlpack: methods tests
fastlab-svn at coffeetalk-1.cc.gatech.edu
fastlab-svn at coffeetalk-1.cc.gatech.edu
Fri Feb 8 15:59:03 EST 2013
Author: rcurtin
Date: 2013-02-08 15:59:02 -0500 (Fri, 08 Feb 2013)
New Revision: 14246
Removed:
mlpack/branches/mlpack-1.x/src/mlpack/methods/fastmks/
mlpack/branches/mlpack-1.x/src/mlpack/tests/fastmks_test.cpp
Modified:
mlpack/branches/mlpack-1.x/src/mlpack/methods/CMakeLists.txt
mlpack/branches/mlpack-1.x/src/mlpack/tests/CMakeLists.txt
Log:
Remove FastMKS (not ready yet).
Modified: mlpack/branches/mlpack-1.x/src/mlpack/methods/CMakeLists.txt
===================================================================
--- mlpack/branches/mlpack-1.x/src/mlpack/methods/CMakeLists.txt 2013-02-08 20:58:18 UTC (rev 14245)
+++ mlpack/branches/mlpack-1.x/src/mlpack/methods/CMakeLists.txt 2013-02-08 20:59:02 UTC (rev 14246)
@@ -2,7 +2,7 @@
set(DIRS
det
emst
- fastmks
+# fastmks
gmm
hmm
kernel_pca
Modified: mlpack/branches/mlpack-1.x/src/mlpack/tests/CMakeLists.txt
===================================================================
--- mlpack/branches/mlpack-1.x/src/mlpack/tests/CMakeLists.txt 2013-02-08 20:58:18 UTC (rev 14245)
+++ mlpack/branches/mlpack-1.x/src/mlpack/tests/CMakeLists.txt 2013-02-08 20:59:02 UTC (rev 14246)
@@ -8,7 +8,6 @@
cli_test.cpp
distribution_test.cpp
emst_test.cpp
- fastmks_test.cpp
gmm_test.cpp
hmm_test.cpp
kernel_test.cpp
Deleted: mlpack/branches/mlpack-1.x/src/mlpack/tests/fastmks_test.cpp
===================================================================
--- mlpack/branches/mlpack-1.x/src/mlpack/tests/fastmks_test.cpp 2013-02-08 20:58:18 UTC (rev 14245)
+++ mlpack/branches/mlpack-1.x/src/mlpack/tests/fastmks_test.cpp 2013-02-08 20:59:02 UTC (rev 14246)
@@ -1,77 +0,0 @@
-/**
- * @file fastmks_test.cpp
- * @author Ryan Curtin
- *
- * Ensure that fast max-kernel search is correct.
- *
- * This file is part of MLPACK 1.0.4.
- *
- * MLPACK is free software: you can redistribute it and/or modify it under the
- * terms of the GNU Lesser General Public License as published by the Free
- * Software Foundation, either version 3 of the License, or (at your option) any
- * later version.
- *
- * MLPACK is distributed in the hope that it will be useful, but WITHOUT ANY
- * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
- * A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
- * details (LICENSE.txt).
- *
- * You should have received a copy of the GNU General Public License along with
- * MLPACK. If not, see <http://www.gnu.org/licenses/>.
- */
-#include <stddef.h>
-size_t distanceEvaluations;
-
-#include <mlpack/core.hpp>
-#include <mlpack/methods/fastmks/fastmks.hpp>
-#include <mlpack/core/kernels/linear_kernel.hpp>
-
-#include <boost/test/unit_test.hpp>
-#include "old_boost_test_definitions.hpp"
-
-using namespace mlpack;
-using namespace mlpack::tree;
-using namespace mlpack::fastmks;
-using namespace mlpack::kernel;
-
-BOOST_AUTO_TEST_SUITE(FastMKSTest);
-
-/**
- * Compare single-tree and naive.
- */
-BOOST_AUTO_TEST_CASE(SingleTreeVsNaive)
-{
- distanceEvaluations = 0;
-
- // First create a random dataset.
- arma::mat data;
- srand(time(NULL));
- data.randn(5, 1000);
- LinearKernel lk;
-
- // Now run FastMKS naively.
- FastMKS<LinearKernel> naive(data, lk, false, true);
-
- arma::Mat<size_t> naiveIndices;
- arma::mat naiveProducts;
- naive.Search(10, naiveIndices, naiveProducts);
-
- // Now run it in single-tree mode.
- FastMKS<LinearKernel> single(data, lk, true);
-
- arma::Mat<size_t> singleIndices;
- arma::mat singleProducts;
- single.Search(10, singleIndices, singleProducts);
-
- // Compare the results.
- for (size_t q = 0; q < singleIndices.n_cols; ++q)
- {
- for (size_t r = 0; r < singleIndices.n_rows; ++r)
- {
- BOOST_REQUIRE_EQUAL(singleIndices(r, q), naiveIndices(r, q));
- BOOST_REQUIRE_CLOSE(singleProducts(r, q), naiveProducts(r, q), 1e-5);
- }
- }
-}
-
-BOOST_AUTO_TEST_SUITE_END();
More information about the mlpack-svn
mailing list