|
CMP++: Uncertainty Quantification & Bayesian Calibration
|
Scaler that standardizes features independently using diagonal variance scaling. More...
#include <scaler.h>


Public Member Functions | |
| EllipticScaler ()=default | |
| Default constructor. | |
| EllipticScaler (const Eigen::Ref< const Eigen::VectorXd > &mean, const Eigen::Ref< const Eigen::VectorXd > &std) | |
| Constructs an EllipticScaler with specified mean and standard deviations. | |
| EllipticScaler (const EllipticScaler &other)=default | |
| EllipticScaler (EllipticScaler &&other)=default | |
| ~EllipticScaler ()=default | |
| EllipticScaler & | operator= (const EllipticScaler &other)=default |
| EllipticScaler & | operator= (EllipticScaler &&other)=default |
| Eigen::VectorXd | transform (const Eigen::Ref< const Eigen::VectorXd > &data) const override |
| Transforms the input data from physical space to the scaled latent space. | |
| Eigen::VectorXd | inverseTransform (const Eigen::Ref< const Eigen::VectorXd > &data) const override |
| Reconstructs the data from the scaled latent space back to physical space. | |
| Eigen::VectorXd | getIntercept () const override |
| Retrieves the intercept vector \( \mu \) used in the transformation. | |
| Eigen::MatrixXd | getScale () const override |
| Retrieves the scaling matrix \( S \) used in the transformation. | |
| void | fit (const Eigen::Ref< const Eigen::MatrixXd > &data) override |
| Learns the scaling parameters (e.g., mean, variance) from the training data. | |
| Eigen::MatrixXd | fit_transform (const Eigen::Ref< const Eigen::MatrixXd > &data) override |
| Fits the scaling parameters to the data and subsequently transforms the data. | |
| void | setMean (const Eigen::Ref< const Eigen::VectorXd > &mean) |
| Explicitly overrides the mean parameters \( \boldsymbol{\mu} \). | |
| void | setStd (const Eigen::Ref< const Eigen::VectorXd > &std) |
| Explicitly overrides the standard deviation parameters \( \boldsymbol{\sigma} \). | |
Private Attributes | |
| Eigen::VectorXd | mean_ |
| The empirical mean vector \( \boldsymbol{\mu} \) of the training dataset. | |
| Eigen::VectorXd | std_ |
| The standard deviation vector \( \boldsymbol{\sigma} \) for each feature. | |
Scaler that standardizes features independently using diagonal variance scaling.
Standardizes each feature coordinate \( j \) independently:
\[ y_j = \frac{x_j - \mu_j}{\sigma_j} \]
where \( \mu_j \) is the mean and \( \sigma_j \) is the standard deviation of feature \( j \). The inverse transformation is:
\[ x_j = y_j \sigma_j + \mu_j \]
|
default |
Default constructor.
|
inline |
Constructs an EllipticScaler with specified mean and standard deviations.
| mean | Pre-computed mean vector \( \boldsymbol{\mu} \). |
| std | Pre-computed standard deviation vector \( \boldsymbol{\sigma} \). |
|
default |
|
default |
|
default |
|
overridevirtual |
Learns the scaling parameters (e.g., mean, variance) from the training data.
| data | A matrix \( X \in \mathbb{R}^{n \times d} \) of training samples. |
Implements cmp::scaler::Scaler.
|
overridevirtual |
Fits the scaling parameters to the data and subsequently transforms the data.
| data | A matrix \( X \in \mathbb{R}^{n \times d} \) of training samples. |
Implements cmp::scaler::Scaler.
|
inlineoverridevirtual |
Retrieves the intercept vector \( \mu \) used in the transformation.
Implements cmp::scaler::Scaler.
|
inlineoverridevirtual |
Retrieves the scaling matrix \( S \) used in the transformation.
Implements cmp::scaler::Scaler.
|
overridevirtual |
Reconstructs the data from the scaled latent space back to physical space.
| data | A column vector \( y \) in the scaled space. |
Implements cmp::scaler::Scaler.
|
default |
|
default |
|
inline |
Explicitly overrides the mean parameters \( \boldsymbol{\mu} \).
| mean | The new mean vector. |
|
inline |
Explicitly overrides the standard deviation parameters \( \boldsymbol{\sigma} \).
| std | The new standard deviation vector. |
|
overridevirtual |
Transforms the input data from physical space to the scaled latent space.
| data | A column vector \( x \) representing a single data point in physical space. |
Implements cmp::scaler::Scaler.
|
private |
The empirical mean vector \( \boldsymbol{\mu} \) of the training dataset.
|
private |
The standard deviation vector \( \boldsymbol{\sigma} \) for each feature.