mlpack
Functions
imputation_test.cpp File Reference
#include <sstream>
#include <mlpack/core.hpp>
#include <mlpack/core/data/load_impl.hpp>
#include <mlpack/core/data/dataset_mapper.hpp>
#include <mlpack/core/data/map_policies/increment_policy.hpp>
#include <mlpack/core/data/map_policies/missing_policy.hpp>
#include <mlpack/core/data/imputer.hpp>
#include <mlpack/core/data/imputation_methods/custom_imputation.hpp>
#include <mlpack/core/data/imputation_methods/listwise_deletion.hpp>
#include <mlpack/core/data/imputation_methods/mean_imputation.hpp>
#include <mlpack/core/data/imputation_methods/median_imputation.hpp>
#include "test_catch_tools.hpp"
#include "catch.hpp"
Include dependency graph for imputation_test.cpp:

Functions

 TEST_CASE ("DatasetMapperImputerTest", "[ImputationTest]")
 
 TEST_CASE ("CustomImputationTest", "[ImputationTest]")
 Make sure CustomImputation method replaces data 0 to 99.
 
 TEST_CASE ("MeanImputationTest", "[ImputationTest]")
 Make sure MeanImputation method replaces data 0 to mean value of each dimensions.
 
 TEST_CASE ("MedianImputationTest", "[ImputationTest]")
 Make sure MedianImputation method replaces data 0 to median value of each dimensions.
 
 TEST_CASE ("ListwiseDeletionTest", "[ImputationTest]")
 Make sure ListwiseDeletion method deletes the whole column (if column wise) or the row (if row wise) containing value of 0.
 
 TEST_CASE ("DatasetMapperNonStringMapping", "[ImputationTest]")
 Make sure we can map non-strings.
 
 TEST_CASE ("DatasetMapperPointerMapping", "[ImputationTest]")
 Make sure we can map strange types.
 

Detailed Description

Author
Keon Kim

Tests for data::Imputer class

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()

TEST_CASE ( "DatasetMapperImputerTest"  ,
""  [ImputationTest] 
)
  1. Make sure a CSV is loaded correctly with mappings using MissingPolicy.
  2. Try Imputer object with CustomImputation method to impute data "a". (It is ok to test on one method since the other ones will be covered in the next cases).