[mlpack-svn] r14247 - in mlpack/tags: . mlpack-1.0.4/src/mlpack/methods mlpack-1.0.4/src/mlpack/tests
fastlab-svn at coffeetalk-1.cc.gatech.edu
fastlab-svn at coffeetalk-1.cc.gatech.edu
Fri Feb 8 16:00:15 EST 2013
Author: rcurtin
Date: 2013-02-08 16:00:15 -0500 (Fri, 08 Feb 2013)
New Revision: 14247
Added:
mlpack/tags/mlpack-1.0.4/
mlpack/tags/mlpack-1.0.4/src/mlpack/methods/CMakeLists.txt
mlpack/tags/mlpack-1.0.4/src/mlpack/tests/CMakeLists.txt
Removed:
mlpack/tags/mlpack-1.0.4/src/mlpack/methods/CMakeLists.txt
mlpack/tags/mlpack-1.0.4/src/mlpack/methods/fastmks/
mlpack/tags/mlpack-1.0.4/src/mlpack/tests/CMakeLists.txt
mlpack/tags/mlpack-1.0.4/src/mlpack/tests/fastmks_test.cpp
Log:
Branch 1.0.4.
Deleted: mlpack/tags/mlpack-1.0.4/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/tags/mlpack-1.0.4/src/mlpack/methods/CMakeLists.txt 2013-02-08 21:00:15 UTC (rev 14247)
@@ -1,29 +0,0 @@
-## recurse
-set(DIRS
- det
- emst
- fastmks
- gmm
- hmm
- kernel_pca
- kmeans
- lars
- linear_regression
-# lmnn
- local_coordinate_coding
- mvu
- naive_bayes
- nca
- neighbor_search
- nmf
- pca
- radical
- range_search
- sparse_coding
-)
-
-foreach(dir ${DIRS})
- add_subdirectory(${dir})
-endforeach()
-
-set(MLPACK_SRCS ${MLPACK_SRCS} ${DIR_SRCS} PARENT_SCOPE)
Copied: mlpack/tags/mlpack-1.0.4/src/mlpack/methods/CMakeLists.txt (from rev 14246, mlpack/branches/mlpack-1.x/src/mlpack/methods/CMakeLists.txt)
===================================================================
--- mlpack/tags/mlpack-1.0.4/src/mlpack/methods/CMakeLists.txt (rev 0)
+++ mlpack/tags/mlpack-1.0.4/src/mlpack/methods/CMakeLists.txt 2013-02-08 21:00:15 UTC (rev 14247)
@@ -0,0 +1,29 @@
+## recurse
+set(DIRS
+ det
+ emst
+# fastmks
+ gmm
+ hmm
+ kernel_pca
+ kmeans
+ lars
+ linear_regression
+# lmnn
+ local_coordinate_coding
+ mvu
+ naive_bayes
+ nca
+ neighbor_search
+ nmf
+ pca
+ radical
+ range_search
+ sparse_coding
+)
+
+foreach(dir ${DIRS})
+ add_subdirectory(${dir})
+endforeach()
+
+set(MLPACK_SRCS ${MLPACK_SRCS} ${DIR_SRCS} PARENT_SCOPE)
Deleted: mlpack/tags/mlpack-1.0.4/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/tags/mlpack-1.0.4/src/mlpack/tests/CMakeLists.txt 2013-02-08 21:00:15 UTC (rev 14247)
@@ -1,54 +0,0 @@
-# MLPACK test executable.
-add_executable(mlpack_test
- mlpack_test.cpp
- allkfn_test.cpp
- allknn_test.cpp
- arma_extend_test.cpp
- aug_lagrangian_test.cpp
- cli_test.cpp
- distribution_test.cpp
- emst_test.cpp
- fastmks_test.cpp
- gmm_test.cpp
- hmm_test.cpp
- kernel_test.cpp
- kernel_pca_test.cpp
- kmeans_test.cpp
- lars_test.cpp
- lin_alg_test.cpp
- linear_regression_test.cpp
- load_save_test.cpp
- local_coordinate_coding_test.cpp
- lrsdp_test.cpp
- math_test.cpp
- nbc_test.cpp
- nca_test.cpp
- nmf_test.cpp
- pca_test.cpp
- radical_test.cpp
- range_search_test.cpp
- save_restore_utility_test.cpp
- sgd_test.cpp
- sort_policy_test.cpp
- sparse_coding_test.cpp
- tree_test.cpp
- union_find_test.cpp
- det_test.cpp
-)
-# Link dependencies of test executable.
-target_link_libraries(mlpack_test
- mlpack
- ${BOOST_unit_test_framework_LIBRARY}
-)
-
-# Copy test data into right place.
-add_custom_command(TARGET mlpack_test
- POST_BUILD
- COMMAND ${CMAKE_COMMAND} -E copy_directory ${CMAKE_CURRENT_SOURCE_DIR}/data/
- ${PROJECT_BINARY_DIR}
-)
-add_custom_command(TARGET mlpack_test
- POST_BUILD
- COMMAND ${CMAKE_COMMAND} -E tar xjpf mnist_first250_training_4s_and_9s.tar.bz2
- WORKING_DIRECTORY ${PROJECT_BINARY_DIR}
-)
Copied: mlpack/tags/mlpack-1.0.4/src/mlpack/tests/CMakeLists.txt (from rev 14246, mlpack/branches/mlpack-1.x/src/mlpack/tests/CMakeLists.txt)
===================================================================
--- mlpack/tags/mlpack-1.0.4/src/mlpack/tests/CMakeLists.txt (rev 0)
+++ mlpack/tags/mlpack-1.0.4/src/mlpack/tests/CMakeLists.txt 2013-02-08 21:00:15 UTC (rev 14247)
@@ -0,0 +1,53 @@
+# MLPACK test executable.
+add_executable(mlpack_test
+ mlpack_test.cpp
+ allkfn_test.cpp
+ allknn_test.cpp
+ arma_extend_test.cpp
+ aug_lagrangian_test.cpp
+ cli_test.cpp
+ distribution_test.cpp
+ emst_test.cpp
+ gmm_test.cpp
+ hmm_test.cpp
+ kernel_test.cpp
+ kernel_pca_test.cpp
+ kmeans_test.cpp
+ lars_test.cpp
+ lin_alg_test.cpp
+ linear_regression_test.cpp
+ load_save_test.cpp
+ local_coordinate_coding_test.cpp
+ lrsdp_test.cpp
+ math_test.cpp
+ nbc_test.cpp
+ nca_test.cpp
+ nmf_test.cpp
+ pca_test.cpp
+ radical_test.cpp
+ range_search_test.cpp
+ save_restore_utility_test.cpp
+ sgd_test.cpp
+ sort_policy_test.cpp
+ sparse_coding_test.cpp
+ tree_test.cpp
+ union_find_test.cpp
+ det_test.cpp
+)
+# Link dependencies of test executable.
+target_link_libraries(mlpack_test
+ mlpack
+ ${BOOST_unit_test_framework_LIBRARY}
+)
+
+# Copy test data into right place.
+add_custom_command(TARGET mlpack_test
+ POST_BUILD
+ COMMAND ${CMAKE_COMMAND} -E copy_directory ${CMAKE_CURRENT_SOURCE_DIR}/data/
+ ${PROJECT_BINARY_DIR}
+)
+add_custom_command(TARGET mlpack_test
+ POST_BUILD
+ COMMAND ${CMAKE_COMMAND} -E tar xjpf mnist_first250_training_4s_and_9s.tar.bz2
+ WORKING_DIRECTORY ${PROJECT_BINARY_DIR}
+)
Deleted: mlpack/tags/mlpack-1.0.4/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/tags/mlpack-1.0.4/src/mlpack/tests/fastmks_test.cpp 2013-02-08 21:00:15 UTC (rev 14247)
@@ -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