mlpack  master
Public Member Functions | Private Attributes | 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...

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 MapperType & Mapper () const
 Get the mapper. More...
 
MapperType & Mapper ()
 Modify the given mapper (be careful!) More...
 
const StrategyType & Strategy () const
 Get the strategy. More...
 
StrategyType & Strategy ()
 Modify the given given strategy (be careful!) More...
 

Private Attributes

bool columnMajor
 
MapperType mapper
 
StrategyType strategy
 

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.

Definition at line 33 of file imputer.hpp.

Constructor & Destructor Documentation

template<typename T , typename MapperType , typename StrategyType >
mlpack::data::Imputer< T, MapperType, StrategyType >::Imputer ( MapperType  mapper,
bool  columnMajor = true 
)
inline

Definition at line 36 of file imputer.hpp.

template<typename T , typename MapperType , typename StrategyType >
mlpack::data::Imputer< T, MapperType, StrategyType >::Imputer ( MapperType  mapper,
StrategyType  strategy,
bool  columnMajor = true 
)
inline

Definition at line 43 of file imputer.hpp.

Member Function Documentation

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. missingValue User defined missing value; it can be anything.
dimensionDimension to apply the imputation.

Definition at line 60 of file imputer.hpp.

References mlpack::data::Imputer< T, MapperType, StrategyType >::columnMajor, mlpack::data::Imputer< T, MapperType, StrategyType >::mapper, and mlpack::data::Imputer< T, MapperType, StrategyType >::strategy.

template<typename T , typename MapperType , typename StrategyType >
const MapperType& mlpack::data::Imputer< T, MapperType, StrategyType >::Mapper ( ) const
inline

Get the mapper.

Definition at line 75 of file imputer.hpp.

References mlpack::data::Imputer< T, MapperType, StrategyType >::mapper.

template<typename T , typename MapperType , typename StrategyType >
MapperType& mlpack::data::Imputer< T, MapperType, StrategyType >::Mapper ( )
inline

Modify the given mapper (be careful!)

Definition at line 78 of file imputer.hpp.

References mlpack::data::Imputer< T, MapperType, StrategyType >::mapper.

template<typename T , typename MapperType , typename StrategyType >
const StrategyType& mlpack::data::Imputer< T, MapperType, StrategyType >::Strategy ( ) const
inline

Get the strategy.

Definition at line 69 of file imputer.hpp.

References mlpack::data::Imputer< T, MapperType, StrategyType >::strategy.

template<typename T , typename MapperType , typename StrategyType >
StrategyType& mlpack::data::Imputer< T, MapperType, StrategyType >::Strategy ( )
inline

Modify the given given strategy (be careful!)

Definition at line 72 of file imputer.hpp.

References mlpack::data::Imputer< T, MapperType, StrategyType >::strategy.

Member Data Documentation

template<typename T , typename MapperType , typename StrategyType >
bool mlpack::data::Imputer< T, MapperType, StrategyType >::columnMajor
private
template<typename T , typename MapperType , typename StrategyType >
MapperType mlpack::data::Imputer< T, MapperType, StrategyType >::mapper
private
template<typename T , typename MapperType , typename StrategyType >
StrategyType mlpack::data::Imputer< T, MapperType, StrategyType >::strategy
private

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