Dakota  Version 6.21
Explore and Predict with Confidence
Public Member Functions | List of all members
NormalizationScaler Class Reference

Normalizes the data using max and min feature values. More...

Inheritance diagram for NormalizationScaler:
DataScaler

Public Member Functions

 NormalizationScaler (const MatrixXd &features, bool mean_normalization, double norm_factor=1.0)
 Main constructor for NormalizationScaler. More...
 
- Public Member Functions inherited from DataScaler
void scale_samples (const MatrixXd &unscaled_samples, MatrixXd &scaled_samples)
 Apply scaling to a set of unscaled samples. More...
 
MatrixXd scale_samples (const MatrixXd &unscaled_samples)
 Apply scaling to a set of unscaled samples. More...
 
const VectorXdget_scaler_features_offsets () const
 Get the vector of offsets. More...
 
const VectorXdget_scaler_features_scale_factors () const
 Get the vector of scaling factors. More...
 
bool check_for_zero_scaler_factor (int index)
 Checks an individual scaler feature scale factor for being close to zero; If it is near zero, we can potentially run into a divide-by-zero error if not handled appropriately. More...
 

Additional Inherited Members

- Public Types inherited from DataScaler
enum  SCALER_TYPE { NONE, STANDARDIZATION, MEAN_NORMALIZATION, MINMAX_NORMALIZATION }
 Enumeration for supported types of DataScalers.
 
- Static Public Member Functions inherited from DataScaler
static SCALER_TYPE scaler_type (const std::string &scaler_name)
 Convert scaler name to enum type. More...
 
- Protected Attributes inherited from DataScaler
bool hasScaling
 Bool for whether or not the the scaling coefficients have been computed.
 
RowVectorXd scaledSample
 Vector for a single scaled sample - (num_features); avoids resize memory allocs.
 
VectorXd scalerFeaturesOffsets
 Vector of offsets - (num_features)
 
VectorXd scalerFeaturesScaleFactors
 Vector of scaling factors - (num_features)
 

Detailed Description

Normalizes the data using max and min feature values.

if (mean_normalization): scaler_offsets = mean else: scaler_offsets = min

scale_factors = (max - min)/norm_factor

Setting mean_normalization = false scales each feature to [0,1]

Constructor & Destructor Documentation

◆ NormalizationScaler()

NormalizationScaler ( const MatrixXd features,
bool  mean_normalization,
double  norm_factor = 1.0 
)

Main constructor for NormalizationScaler.

Parameters
[in]featuresUnscaled data matrix - (num_samples by num_features)
[in]mean_normalizationFlag for whether to use mean or min value as the offset
[in]norm_factorOptional scaling factor applied to each feature Has a default value of 1.0

References DataScaler::hasScaling, DataScaler::scaledSample, DataScaler::scalerFeaturesOffsets, and DataScaler::scalerFeaturesScaleFactors.


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