|
| AZ_RTTI (StandardScaler, "{A0C7F056-94B0-43A1-8D12-B1A7B67AB92A}", FeatureMatrixTransformer) |
|
bool | Fit (const FeatureMatrix &featureMatrix, const Settings &settings={}) override |
|
float | Transform (float value, FeatureMatrix::Index column) const override |
|
AZ::Vector2 | Transform (const AZ::Vector2 &value, FeatureMatrix::Index column) const override |
|
AZ::Vector3 | Transform (const AZ::Vector3 &value, FeatureMatrix::Index column) const override |
|
void | Transform (AZStd::span< float > data) const override |
|
FeatureMatrix | Transform (const FeatureMatrix &featureMatrix) const override |
|
FeatureMatrix | InverseTransform (const FeatureMatrix &featureMatrix) const override |
|
AZ::Vector2 | InverseTransform (const AZ::Vector2 &value, FeatureMatrix::Index column) const override |
|
AZ::Vector3 | InverseTransform (const AZ::Vector3 &value, FeatureMatrix::Index column) const override |
|
float | InverseTransform (float value, FeatureMatrix::Index column) const override |
| Input: Already transformed data, Output: Inverse transformed data (should match data before transform)
|
|
const AZStd::vector< float > & | GetMeans () const |
|
const AZStd::vector< float > & | GetStandardDeviations () const |
|
void | SaveAsCsv (const char *filename, const AZStd::vector< AZStd::string > &columnNames={}) |
|
| AZ_RTTI (FeatureMatrixTransformer, "{B19CDBB8-FA99-4CBD-86C1-640A3CC5988A}") |
|
| AZ_CLASS_ALLOCATOR (FeatureMatrixTransformer, MotionMatchAllocator) |
|
virtual bool | Fit (const FeatureMatrix &featureMatrix, const Settings &settings)=0 |
|
virtual float | Transform (float value, FeatureMatrix::Index column) const =0 |
|
virtual AZ::Vector2 | Transform (const AZ::Vector2 &value, FeatureMatrix::Index column) const =0 |
|
virtual AZ::Vector3 | Transform (const AZ::Vector3 &value, FeatureMatrix::Index column) const =0 |
|
virtual void | Transform (AZStd::span< float > data) const =0 |
|
virtual FeatureMatrix | Transform (const FeatureMatrix &in) const =0 |
|
virtual float | InverseTransform (float value, FeatureMatrix::Index column) const =0 |
| Input: Already transformed data, Output: Inverse transformed data (should match data before transform)
|
|
virtual AZ::Vector2 | InverseTransform (const AZ::Vector2 &value, FeatureMatrix::Index column) const =0 |
|
virtual AZ::Vector3 | InverseTransform (const AZ::Vector3 &value, FeatureMatrix::Index column) const =0 |
|
virtual FeatureMatrix | InverseTransform (const FeatureMatrix &in) const =0 |
|
The standard scaler can be used to normalize the feature matrix, the query vector and other data. It standardizes features by subtracting the mean and scaling to the unit variance. This implementation is mimicking the behavior of the standard scaler from scikit-learn (sklearn.preprocessing.StandardScaler). As we use floats by default, our errors are bigger, especially if the variance is small as this leads to a division by a small value. In case the calculated standard deviation for a given feature is smaller than the given s_epsilon value, the standard deviation gets force-set to 1.0 to avoid divisions by infinity and preserve the value when doing the transform -> inverse-transform roundtrip.