mlpack
Functions
kernel_test.cpp File Reference
#include <mlpack/core/kernels/cosine_distance.hpp>
#include <mlpack/core/kernels/epanechnikov_kernel.hpp>
#include <mlpack/core/kernels/gaussian_kernel.hpp>
#include <mlpack/core/kernels/hyperbolic_tangent_kernel.hpp>
#include <mlpack/core/kernels/laplacian_kernel.hpp>
#include <mlpack/core/kernels/linear_kernel.hpp>
#include <mlpack/core/kernels/polynomial_kernel.hpp>
#include <mlpack/core/kernels/spherical_kernel.hpp>
#include <mlpack/core/kernels/pspectrum_string_kernel.hpp>
#include <mlpack/core/kernels/cauchy_kernel.hpp>
#include <mlpack/core/metrics/lmetric.hpp>
#include <mlpack/core/metrics/mahalanobis_distance.hpp>
#include "catch.hpp"
#include "test_catch_tools.hpp"
#include "serialization.hpp"
Include dependency graph for kernel_test.cpp:

Functions

 TEST_CASE ("ManhattanDistanceTest", "[KernelTest]")
 Basic test of the Manhattan distance.
 
 TEST_CASE ("SquaredEuclideanDistanceTest", "[KernelTest]")
 Basic test of squared Euclidean distance.
 
 TEST_CASE ("EuclideanDistanceTest", "[KernelTest]")
 Basic test of Euclidean distance.
 
 TEST_CASE ("ArbitraryCaseTest", "[KernelTest]")
 Arbitrary test case for coverage.
 
 TEST_CASE ("LMetricZerosTest", "[KernelTest]")
 Make sure two vectors of all zeros return zero distance, for a few different powers.
 
 TEST_CASE ("MDUnsetCovarianceTest", "[KernelTest]")
 Simple test of Mahalanobis distance with unset covariance matrix in constructor.
 
 TEST_CASE ("MDRootUnsetCovarianceTest", "[KernelTest]")
 Simple test of Mahalanobis distance with unset covariance matrix in constructor and t_take_root set to true.
 
 TEST_CASE ("MDEyeCovarianceTest", "[KernelTest]")
 Simple test of Mahalanobis distance setting identity covariance in constructor.
 
 TEST_CASE ("MDRootEyeCovarianceTest", "[KernelTest]")
 Simple test of Mahalanobis distance setting identity covariance in constructor and t_take_root set to true.
 
 TEST_CASE ("MDDiagonalCovarianceTest", "[KernelTest]")
 Simple test with diagonal covariance matrix.
 
 TEST_CASE ("MDFullCovarianceTest", "[KernelTest]")
 More specific case with more difficult covariance matrix.
 
 TEST_CASE ("CosineDistanceSameAngleTest", "[KernelTest]")
 Simple test case for the cosine distance.
 
 TEST_CASE ("CosineDistanceOrthogonalTest", "[KernelTest]")
 Now let's have them be orthogonal.
 
 TEST_CASE ("CosineDistanceRandomTest", "[KernelTest]")
 Some random angle test.
 
 TEST_CASE ("LinearKernelTest", "[KernelTest]")
 Linear Kernel test.
 
 TEST_CASE ("LinearKernelOrthogonalTest", "[KernelTest]")
 Linear Kernel test, orthogonal vectors.
 
 TEST_CASE ("GaussianKernelTest", "[KernelTest]")
 
 TEST_CASE ("GaussianKernelSerializationTest", "[KernelTest]")
 
 TEST_CASE ("SphericalKernelTest", "[KernelTest]")
 
 TEST_CASE ("EpanechnikovKernelTest", "[KernelTest]")
 
 TEST_CASE ("PolynomialKernelTest", "[KernelTest]")
 
 TEST_CASE ("HyperbolicTangentKernelTest", "[KernelTest]")
 
 TEST_CASE ("LaplacianKernelTest", "[KernelTest]")
 
 TEST_CASE ("PSpectrumSubstringExtractionTest", "[KernelTest]")
 
 TEST_CASE ("PSpectrumStringEvaluateTest", "[KernelTest]")
 
 TEST_CASE ("CauchyKernelTest", "[KernelTest]")
 Cauchy Kernel test.
 

Detailed Description

Author
Ryan Curtin
Ajinkya Kale

Tests for the various kernel classes.

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.