mlpack
Functions
aknn_test.cpp File Reference

Test file for KNN class with different values of epsilon. More...

#include <mlpack/core.hpp>
#include <mlpack/methods/neighbor_search/neighbor_search.hpp>
#include <mlpack/methods/neighbor_search/unmap.hpp>
#include <mlpack/methods/neighbor_search/ns_model.hpp>
#include <mlpack/core/tree/cover_tree.hpp>
#include <mlpack/core/tree/example_tree.hpp>
#include "test_catch_tools.hpp"
#include "catch.hpp"
Include dependency graph for aknn_test.cpp:

Functions

 TEST_CASE ("AKNNApproxVsExact1", "[AKNNTest]")
 Test the dual-tree nearest-neighbors method with different values for epsilon. More...
 
 TEST_CASE ("AKNNApproxVsExact2", "[AKNNTest]")
 Test the dual-tree nearest-neighbors method with the exact method. More...
 
 TEST_CASE ("AKNNSingleTreeApproxVsExact", "[AKNNTest]")
 Test the single-tree nearest-neighbors method with the exact method. More...
 
 TEST_CASE ("AKNNSingleCoverTreeTest", "[AKNNTest]")
 Test the cover tree single-tree nearest-neighbors method against the exact method. More...
 
 TEST_CASE ("AKNNDualCoverTreeTest", "[AKNNTest]")
 Test the cover tree dual-tree nearest neighbors method against the exact method. More...
 
 TEST_CASE ("AKNNSingleBallTreeTest", "[AKNNTest]")
 Test the ball tree single-tree nearest-neighbors method against the exact method. More...
 
 TEST_CASE ("AKNNDualBallTreeTest", "[AKNNTest]")
 Test the ball tree dual-tree nearest neighbors method against the exact method. More...
 
 TEST_CASE ("AKNNSingleSpillTreeTest", "[AKNNTest]")
 Test the spill tree hybrid sp-tree search (defeatist search on overlapping nodes, and backtracking in non-overlapping nodes) against the naive method. More...
 
 TEST_CASE ("AKNNSparseKNNKDTreeTest", "[AKNNTest]")
 Make sure sparse nearest neighbors works with kd trees.
 
 TEST_CASE ("AKNNModelTest", "[AKNNTest]")
 Ensure that we can build an NSModel<NearestNeighborSearch> and get correct results.
 
 TEST_CASE ("AKNNModelMonochromaticTest", "[AKNNTest]")
 Ensure that we can build an NSModel<NearestNeighborSearch> and get correct results, in the case where the reference set is the same as the query set.
 

Detailed Description

Test file for KNN class with different values of epsilon.

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.

Function Documentation

◆ TEST_CASE() [1/8]

TEST_CASE ( "AKNNApproxVsExact1"  ,
""  [AKNNTest] 
)

Test the dual-tree nearest-neighbors method with different values for epsilon.

This uses both a query and reference dataset.

Errors are produced if the results are not according to relative error.

◆ TEST_CASE() [2/8]

TEST_CASE ( "AKNNApproxVsExact2"  ,
""  [AKNNTest] 
)

Test the dual-tree nearest-neighbors method with the exact method.

This uses only a reference dataset.

Errors are produced if the results are not according to relative error.

◆ TEST_CASE() [3/8]

TEST_CASE ( "AKNNSingleTreeApproxVsExact"  ,
""  [AKNNTest] 
)

Test the single-tree nearest-neighbors method with the exact method.

This uses only a reference dataset.

Errors are produced if the results are not according to relative error.

◆ TEST_CASE() [4/8]

TEST_CASE ( "AKNNSingleCoverTreeTest"  ,
""  [AKNNTest] 
)

Test the cover tree single-tree nearest-neighbors method against the exact method.

This uses only a random reference dataset.

Errors are produced if the results are not according to relative error.

◆ TEST_CASE() [5/8]

TEST_CASE ( "AKNNDualCoverTreeTest"  ,
""  [AKNNTest] 
)

Test the cover tree dual-tree nearest neighbors method against the exact method.

Errors are produced if the results are not according to relative error.

◆ TEST_CASE() [6/8]

TEST_CASE ( "AKNNSingleBallTreeTest"  ,
""  [AKNNTest] 
)

Test the ball tree single-tree nearest-neighbors method against the exact method.

This uses only a random reference dataset.

Errors are produced if the results are not according to relative error.

◆ TEST_CASE() [7/8]

TEST_CASE ( "AKNNDualBallTreeTest"  ,
""  [AKNNTest] 
)

Test the ball tree dual-tree nearest neighbors method against the exact method.

Errors are produced if the results are not according to relative error.

◆ TEST_CASE() [8/8]

TEST_CASE ( "AKNNSingleSpillTreeTest"  ,
""  [AKNNTest] 
)

Test the spill tree hybrid sp-tree search (defeatist search on overlapping nodes, and backtracking in non-overlapping nodes) against the naive method.

This uses only a random reference dataset.

Errors are produced if the results are not according to relative error.