|
CMP++: Uncertainty Quantification & Bayesian Calibration
|
Linearly scales features to a target bounding box range. More...
#include <scaler.h>


Public Member Functions | |
| MinMaxScaler ()=default | |
| Default constructor. | |
| MinMaxScaler (const Eigen::Ref< const Eigen::VectorXd > &min, const Eigen::Ref< const Eigen::VectorXd > &max) | |
| Constructs a MinMaxScaler bounded to a specific target range. | |
| MinMaxScaler (const MinMaxScaler &other)=default | |
| MinMaxScaler (MinMaxScaler &&other)=default | |
| ~MinMaxScaler ()=default | |
| MinMaxScaler & | operator= (const MinMaxScaler &other)=default |
| MinMaxScaler & | operator= (MinMaxScaler &&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 | getDataMin () const |
| Retrieves the empirical minimum vector \( \mathbf{x}_{\text{min}} \) found during fitting. | |
| Eigen::VectorXd | getDataMax () const |
| Retrieves the empirical maximum vector \( \mathbf{x}_{\text{max}} \) found during fitting. | |
| 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. | |
| 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. | |
Private Attributes | |
| Eigen::VectorXd | min_ |
| Target minimum value bounding vector \( \mathbf{a} \). | |
| Eigen::VectorXd | max_ |
| Target maximum value bounding vector \( \mathbf{b} \). | |
| Eigen::VectorXd | data_min_ |
| Empirical minimum value vector \( \mathbf{x}_{\text{min}} \) observed in the training dataset. | |
| Eigen::VectorXd | data_max_ |
| Empirical maximum value vector \( \mathbf{x}_{\text{max}} \) observed in the training dataset. | |
Linearly scales features to a target bounding box range.
Scales each feature vector component to live within a target range \([a_j, b_j]\) (typically \([0, 1]\)):
\[ y_j = a_j + \frac{x_j - x_{\text{min}, j}}{x_{\text{max}, j} - x_{\text{min}, j}} (b_j - a_j) \]
where \(x_{\text{min}, j}\) and \(x_{\text{max}, j}\) are the training data's empirical minimum and maximum values for feature \(j\).
fit() computes column-wise minima and maxima vectors of the training matrix.transform() and inverseTransform() apply element-wise division and scaling multiplication.
|
default |
Default constructor.
|
inline |
Constructs a MinMaxScaler bounded to a specific target range.
| min | The target minimum bounding vector \( \mathbf{a} \). |
| max | The target maximum bounding vector \( \mathbf{b} \). |
|
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.
|
inline |
Retrieves the empirical maximum vector \( \mathbf{x}_{\text{max}} \) found during fitting.
|
inline |
Retrieves the empirical minimum vector \( \mathbf{x}_{\text{min}} \) found during fitting.
|
overridevirtual |
Retrieves the intercept vector \( \mu \) used in the transformation.
Implements cmp::scaler::Scaler.
|
overridevirtual |
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 |
|
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 |
Empirical maximum value vector \( \mathbf{x}_{\text{max}} \) observed in the training dataset.
|
private |
Empirical minimum value vector \( \mathbf{x}_{\text{min}} \) observed in the training dataset.
|
private |
Target maximum value bounding vector \( \mathbf{b} \).
|
private |
Target minimum value bounding vector \( \mathbf{a} \).