Feat C++ API
A feature engineering automation tool
FT::Util::Normalizer Struct Reference

normalizes a matrix to unit variance, 0 mean centered. More...

#include <utils.h>

Collaboration diagram for FT::Util::Normalizer:

Public Member Functions

 Normalizer (bool sa=true, bool rm_offset=true)
 
template<typename T >
void fit (const MatrixBase< T > &X, const vector< char > &dt)
 fit the scale and offset of data. More...
 
template<typename T >
void normalize (MatrixBase< T > &X) const
 normalize matrix. More...
 
template<typename T >
void adjust_weights (MatrixBase< T > &B) const
 return weights of a linear model, y = B*X, given weights of More...
 
template<typename T >
void adjust_weights (shogun::SGVector< T > &B) const
 
template<typename T >
void adjust_weights (vector< T > &B) const
 
template<typename T >
float adjust_offset (const MatrixBase< T > &Bn, float init_offset) const
 
template<typename T >
float adjust_offset (const vector< T > &Bn, float init_offset) const
 
template<typename T >
float adjust_offset (const shogun::SGVector< T > &Bn, float init_offset) const
 
template<typename T >
void invert (MatrixBase< T > &X) const
 inverse normalize a matrix. More...
 
template<typename T >
void fit_normalize (MatrixBase< T > &X, const vector< char > &dtypes)
 fit then normalize More...
 

Public Attributes

vector< float > scale
 
vector< float > offset
 
vector< char > dtypes
 
bool scale_all
 
bool remove_offset
 

Detailed Description

normalizes a matrix to unit variance, 0 mean centered.

Definition at line 146 of file utils.h.

Constructor & Destructor Documentation

◆ Normalizer()

FT::Util::Normalizer::Normalizer ( bool  sa = true,
bool  rm_offset = true 
)
inline

Definition at line 148 of file utils.h.

Member Function Documentation

◆ adjust_offset() [1/3]

template<typename T >
float FT::Util::Normalizer::adjust_offset ( const MatrixBase< T > &  Bn,
float  init_offset 
) const
inline

Definition at line 249 of file utils.h.

◆ adjust_offset() [2/3]

template<typename T >
float FT::Util::Normalizer::adjust_offset ( const shogun::SGVector< T > &  Bn,
float  init_offset 
) const
inline

Definition at line 281 of file utils.h.

◆ adjust_offset() [3/3]

template<typename T >
float FT::Util::Normalizer::adjust_offset ( const vector< T > &  Bn,
float  init_offset 
) const
inline

Definition at line 274 of file utils.h.

◆ adjust_weights() [1/3]

template<typename T >
void FT::Util::Normalizer::adjust_weights ( MatrixBase< T > &  B) const
inline

return weights of a linear model, y = B*X, given weights of

Definition at line 215 of file utils.h.

◆ adjust_weights() [2/3]

template<typename T >
void FT::Util::Normalizer::adjust_weights ( shogun::SGVector< T > &  B) const
inline

Definition at line 235 of file utils.h.

◆ adjust_weights() [3/3]

template<typename T >
void FT::Util::Normalizer::adjust_weights ( vector< T > &  B) const
inline

Definition at line 242 of file utils.h.

◆ fit()

template<typename T >
void FT::Util::Normalizer::fit ( const MatrixBase< T > &  X,
const vector< char > &  dt 
)
inline

fit the scale and offset of data.

Definition at line 161 of file utils.h.

◆ fit_normalize()

template<typename T >
void FT::Util::Normalizer::fit_normalize ( MatrixBase< T > &  X,
const vector< char > &  dtypes 
)
inline

fit then normalize

Definition at line 315 of file utils.h.

◆ invert()

template<typename T >
void FT::Util::Normalizer::invert ( MatrixBase< T > &  X) const
inline

inverse normalize a matrix.

Definition at line 289 of file utils.h.

◆ normalize()

template<typename T >
void FT::Util::Normalizer::normalize ( MatrixBase< T > &  X) const
inline

normalize matrix.

Definition at line 191 of file utils.h.

Member Data Documentation

◆ dtypes

vector<char> FT::Util::Normalizer::dtypes

Definition at line 155 of file utils.h.

◆ offset

vector<float> FT::Util::Normalizer::offset

Definition at line 154 of file utils.h.

◆ remove_offset

bool FT::Util::Normalizer::remove_offset

Definition at line 157 of file utils.h.

◆ scale

vector<float> FT::Util::Normalizer::scale

Definition at line 153 of file utils.h.

◆ scale_all

bool FT::Util::Normalizer::scale_all

Definition at line 156 of file utils.h.


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