13 #ifndef MLPACK_CORE_DATA_IMPUTER_HPP 14 #define MLPACK_CORE_DATA_IMPUTER_HPP 32 template<
typename T,
typename MapperType,
typename StrategyType>
37 mapper(
std::move(mapper)),
44 strategy(
std::move(strategy)),
45 mapper(
std::move(mapper)),
62 const size_t dimension)
64 T mappedValue =
static_cast<T
>(
mapper.UnmapValue(missingValue, dimension));
MapperType & Mapper()
Modify the given mapper (be careful!)
Linear algebra utility functions, generally performed on matrices or vectors.
StrategyType & Strategy()
Modify the given given strategy (be careful!)
The core includes that mlpack expects; standard C++ includes and Armadillo.
const MapperType & Mapper() const
Get the mapper.
Given a dataset of a particular datatype, replace user-specified missing value with a variable depend...
const StrategyType & Strategy() const
Get the strategy.
test cpp RESULT_VARIABLE MEX_RESULT_TRASH OUTPUT_VARIABLE MEX_OUTPUT ERROR_VARIABLE MEX_ERROR_TRASH string(REGEX MATCH"Warning: You are using"MEX_WARNING"${MEX_OUTPUT}") if(MEX_WARNING) string(REGEX REPLACE".*using [a-zA-Z]* version \"([0-9.]*)[^\"]*\".*""\\1"OTHER_COMPILER_VERSION"$
void Impute(arma::Mat< T > &input, const std::string &missingValue, const size_t dimension)
Given an input dataset, replace missing values of a dimension with given imputation strategy...
Imputer(MapperType mapper, bool columnMajor=true)
Imputer(MapperType mapper, StrategyType strategy, bool columnMajor=true)