mlpack
|
#include <string>
#include <mlpack/core.hpp>
#include <mlpack/core/util/mlpack_main.hpp>
#include "test_helper.hpp"
#include <mlpack/methods/range_search/range_search_main.cpp>
#include "range_search_utils.hpp"
#include "../catch.hpp"
Classes | |
struct | RangeSearchTestFixture |
Macros | |
#define | BINDING_TYPE BINDING_TYPE_TEST |
Functions | |
TEST_CASE_METHOD (RangeSearchTestFixture, "RangeSearchNoReference", "[RangeSearchMainTest][BindingTests]") | |
Check that we have to specify a reference set or input model. | |
TEST_CASE_METHOD (RangeSearchTestFixture, "RangeSearchWrongParameter", "[RangeSearchMainTest][BindingTests]") | |
Check that we cannot pass an incorrect parameter. | |
TEST_CASE_METHOD (RangeSearchTestFixture, "RangeSearchInputModelNoQuery", "[RangeSearchMainTest][BindingTests]") | |
Check that we have to specify a query if an input model is specified. | |
TEST_CASE_METHOD (RangeSearchTestFixture, "RangeSearchDifferentTree", "[RangeSearchMainTest][BindingTests]") | |
Check that we cannot specify a tree type which is not available or wrong. | |
TEST_CASE_METHOD (RangeSearchTestFixture, "RangeSearchBothReferenceAndModel", "[RangeSearchMainTest][BindingTests]") | |
Check that we cannot specify both a reference set and input model. | |
TEST_CASE_METHOD (RangeSearchTestFixture, "RangeSearchTest", "[RangeSearchMainTest][BindingTests]") | |
Check that the correct output is returned for a small synthetic input case, by comparing with pre-calculated neighbor and distance values, when no query set is specified. | |
TEST_CASE_METHOD (RangeSearchTestFixture, "RangeSeachTestwithQuery", "[RangeSearchMainTest][BindingTests]") | |
Check that the correct output is returned for a small synthetic input case, when a query set is provided. | |
TEST_CASE_METHOD (RangeSearchTestFixture, "ModelCheck", "[RangeSearchMainTest][BindingTests]") | |
Train a model using a synthetic dataset and then output the model, and ensure it can be used again. | |
TEST_CASE_METHOD (RangeSearchTestFixture, "LeafValueTesting", "[RangeSearchMainTest][BindingTests]") | |
Check that the models are different but the results are the same for three different leaf size parameters. | |
TEST_CASE_METHOD (RangeSearchTestFixture, "TreeTypeTesting", "[RangeSearchMainTest][BindingTests]") | |
Make sure that the models are different but the results are the same for different tree types. More... | |
TEST_CASE_METHOD (RangeSearchTestFixture, "RandomBasisTesting", "[RangeSearchMainTest][BindingTests]") | |
Project the data onto a random basis and ensure that this gives identical results to non-projected data but different models. | |
TEST_CASE_METHOD (RangeSearchTestFixture, "NaiveModeTest", "[RangeSearchMainTest][BindingTests]") | |
Ensure that naive mode gives the same result, but different models. | |
TEST_CASE_METHOD (RangeSearchTestFixture, "SingleModeTest", "[RangeSearchMainTest][BindingTests]") | |
Ensure that single-tree mode gives the same result but different models. | |
Test mlpackMain() of range_search_main.cpp.
mlpack is free software; you may redistribute it and/or modify it under the terms of the 3-clause BSD license. You should have received a copy of the 3-clause BSD license along with mlpack. If not, see http://www.opensource.org/licenses/BSD-3-Clause for more information.
TEST_CASE_METHOD | ( | RangeSearchTestFixture | , |
"TreeTypeTesting" | , | ||
"" | [RangeSearchMainTest][BindingTests] | ||
) |
Make sure that the models are different but the results are the same for different tree types.
We use the default kd-tree as the base model to compare against.