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. More...

 
const StrategyType & Strategy () const
 Get the strategy. More...

 
StrategyType & Strategy ()
 Modify the given strategy. More...

 

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

◆ Imputer() [1/2]

Imputer ( MapperType  mapper,
bool  columnMajor = true 
)
inline

Definition at line 36 of file imputer.hpp.

◆ Imputer() [2/2]

Imputer ( MapperType  mapper,
StrategyType  strategy,
bool  columnMajor = true 
)
inline

Definition at line 43 of file imputer.hpp.

Member Function Documentation

◆ Impute()

void 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.

Definition at line 60 of file imputer.hpp.

◆ Mapper() [1/2]

const MapperType& Mapper ( ) const
inline

Get the mapper.

Definition at line 75 of file imputer.hpp.

◆ Mapper() [2/2]

MapperType& Mapper ( )
inline

Modify the given mapper.

Definition at line 78 of file imputer.hpp.

◆ Strategy() [1/2]

const StrategyType& Strategy ( ) const
inline

Get the strategy.

Definition at line 69 of file imputer.hpp.

◆ Strategy() [2/2]

StrategyType& Strategy ( )
inline

Modify the given strategy.

Definition at line 72 of file imputer.hpp.


The documentation for this class was generated from the following file:
  • /home/jenkins-mlpack/mlpack.org/_src/mlpack-3.3.2/src/mlpack/core/data/imputer.hpp