mlpack  master
Public Member Functions | Private Attributes | List of all members
mlpack::data::CustomImputation< T > Class Template Reference

A simple custom imputation class. More...

Public Member Functions

 CustomImputation (T customValue)
 
void Impute (arma::Mat< T > &input, const T &mappedValue, const size_t dimension, const bool columnMajor=true)
 Impute function searches through the input looking for mappedValue and replaces it with the user-defined custom value of the given dimension. More...
 

Private Attributes

customValue
 A user-defined value that the user wants to replace missing values with. More...
 

Detailed Description

template<typename T>
class mlpack::data::CustomImputation< T >

A simple custom imputation class.

Template Parameters
TType of armadillo matrix

Definition at line 24 of file custom_imputation.hpp.

Constructor & Destructor Documentation

template<typename T >
mlpack::data::CustomImputation< T >::CustomImputation ( customValue)
inline

Definition at line 27 of file custom_imputation.hpp.

Member Function Documentation

template<typename T >
void mlpack::data::CustomImputation< T >::Impute ( arma::Mat< T > &  input,
const T &  mappedValue,
const size_t  dimension,
const bool  columnMajor = true 
)
inline

Impute function searches through the input looking for mappedValue and replaces it with the user-defined custom value of the given dimension.

The result is overwritten to the input, not creating any copy. Custom value must be set when initializing the CustomImputation object.

Parameters
inputMatrix that contains mappedValue.
mappedValueValue that the user wants to get rid of.
dimensionIndex of the dimension of the mappedValue.
columnMajorState of whether the input matrix is columnMajor or not.

Definition at line 44 of file custom_imputation.hpp.

References mlpack::data::CustomImputation< T >::customValue.

Member Data Documentation

template<typename T >
T mlpack::data::CustomImputation< T >::customValue
private

A user-defined value that the user wants to replace missing values with.

Definition at line 76 of file custom_imputation.hpp.

Referenced by mlpack::data::CustomImputation< T >::Impute().


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