mlpack
Public Member Functions | List of all members
mlpack::data::Imputer< T, MapperType, StrategyType > Class Template Reference

Given a dataset of a particular datatype, replace user-specified missing value with a variable dependent on the StrategyType and MapperType. More...

#include <imputer.hpp>

Public Member Functions

 Imputer (MapperType mapper, bool columnMajor=true)
 
 Imputer (MapperType mapper, StrategyType strategy, bool columnMajor=true)
 
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. More...
 
const StrategyType & Strategy () const
 Get the strategy.
 
StrategyType & Strategy ()
 Modify the given strategy.
 
const MapperType & Mapper () const
 Get the mapper.
 
MapperType & Mapper ()
 Modify the given mapper.
 

Detailed Description

template<typename T, typename MapperType, typename StrategyType>
class mlpack::data::Imputer< T, MapperType, StrategyType >

Given a dataset of a particular datatype, replace user-specified missing value with a variable dependent on the StrategyType and MapperType.

Template Parameters
TType of armadillo matrix used for imputation strategy.
MapperTypeDatasetMapper that is used to hold dataset information.
StrategyTypeImputation strategy used.

Member Function Documentation

◆ Impute()

template<typename T , typename MapperType , typename StrategyType >
void mlpack::data::Imputer< T, MapperType, StrategyType >::Impute ( arma::Mat< T > &  input,
const std::string &  missingValue,
const size_t  dimension 
)
inline

Given an input dataset, replace missing values of a dimension with given imputation strategy.

This function does not produce output matrix, but overwrites the result into the input matrix.

Parameters
inputInput dataset to apply imputation.
missingValueUser defined missing value; it can be anything.
dimensionDimension to apply the imputation.

The documentation for this class was generated from the following file: