mlpack
Classes | Macros | Functions
kmeans_test.cpp File Reference
#include <string>
#include <mlpack/core.hpp>
#include <mlpack/core/util/mlpack_main.hpp>
#include "test_helper.hpp"
#include <mlpack/methods/kmeans/kmeans_main.cpp>
#include "../catch.hpp"
#include "../test_catch_tools.hpp"
Include dependency graph for kmeans_test.cpp:

Classes

struct  KmTestFixture
 

Macros

#define BINDING_TYPE   BINDING_TYPE_TEST
 

Functions

void ResetKmSettings ()
 
 TEST_CASE_METHOD (KmTestFixture, "NonNegativeClustersTest", "[KmeansMainTest][BindingTests]")
 Checking that number of Clusters are non negative.
 
 TEST_CASE_METHOD (KmTestFixture, "AutoDetectClusterTest", "[KmeansMainTest][BindingTests]")
 Checking that initial centroids are provided if clusters are to be auto detected.
 
 TEST_CASE_METHOD (KmTestFixture, "RefinedStartPercentageTest", "[KmeansMainTest][BindingTests]")
 Checking that percentage is between 0 and 1 when –refined_start is specified.
 
 TEST_CASE_METHOD (KmTestFixture, "NonNegativePercentageTest", "[KmeansMainTest][BindingTests]")
 Checking percentage is non-negative when –refined_start is specified.
 
 TEST_CASE_METHOD (KmTestFixture, "KmClusteringSizeCheck", "[KmeansMainTest][BindingTests]")
 Checking that size and dimensionality of prediction is correct.
 
 TEST_CASE_METHOD (KmTestFixture, "KmClusteringSizeCheckLabelOnly", "[KmeansMainTest][BindingTests]")
 Checking that size and dimensionality of prediction is correct when –labels_only is specified.
 
 TEST_CASE_METHOD (KmTestFixture, "KmClusteringEmptyClustersCheck", "[KmeansMainTest][BindingTests]")
 Checking that predictions are not same when –allow_empty_clusters or kill_empty_clusters are specified.
 
 TEST_CASE_METHOD (KmTestFixture, "KmClusteringResultSizeCheck", "[KmeansMainTest][BindingTests]")
 Checking that that size and dimensionality of Final Input File is correct when flag –in_place is specified.
 
 TEST_CASE_METHOD (KmTestFixture, "KmClustersNotDefined", "[KmeansMainTest][BindingTests]")
 Ensuring that absence of Number of Clusters is checked.
 
 TEST_CASE_METHOD (KmTestFixture, "AlgorithmsSimilarTest", "[KmeansMainTest][BindingTests]")
 Checking that all the algorithms yield same results.
 

Detailed Description

Author
Prabhat Sharma

Test mlpackMain() of kmeans_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.