Dakota
Version 6.21
Explore and Predict with Confidence
|
Normalizes the data using max and min feature values. More...
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 VectorXd & | get_scaler_features_offsets () const |
Get the vector of offsets. More... | |
const VectorXd & | get_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) | |
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]
NormalizationScaler | ( | const MatrixXd & | features, |
bool | mean_normalization, | ||
double | norm_factor = 1.0 |
||
) |
Main constructor for NormalizationScaler.
[in] | features | Unscaled data matrix - (num_samples by num_features) |
[in] | mean_normalization | Flag for whether to use mean or min value as the offset |
[in] | norm_factor | Optional scaling factor applied to each feature Has a default value of 1.0 |
References DataScaler::hasScaling, DataScaler::scaledSample, DataScaler::scalerFeaturesOffsets, and DataScaler::scalerFeaturesScaleFactors.