A static class providing utilities for scaling the query and the reference datasets. More...
Static Public Member Functions | |
static void | ScaleDataByMinMax (Matrix &qset, Matrix &rset, bool queries_equal_references) |
Scale the given query and the reference datasets to fit in the unit hypercube $[0,1]^D$ where $D$ is the common dimensionality of the two datasets. | |
static void | StandardizeData (Matrix &qset, Matrix &rset, bool queries_equal_references) |
Standardize the given query and the reference datasets in each dimension to have zero mean and at most unit variance. | |
static void | TranslateDataByMin (Matrix &qset, Matrix &rset, bool queries_equal_references) |
Scale the given query and the reference datasets to lie in the positive quadrant. |
A static class providing utilities for scaling the query and the reference datasets.
Example use:
DatasetScaler::ScaleDataByMinMax(qset, rset, queries_equal_references);
Definition at line 55 of file dataset_scaler.h.
static void DatasetScaler::ScaleDataByMinMax | ( | Matrix & | qset, | |
Matrix & | rset, | |||
bool | queries_equal_references | |||
) | [inline, static] |
Scale the given query and the reference datasets to fit in the unit hypercube $[0,1]^D$ where $D$ is the common dimensionality of the two datasets.
qset | The column-oriented query set. | |
rset | The column-oriented reference set. | |
queries_equal_references | The boolean flag that tells whether the queries equal the references. |
Definition at line 117 of file dataset_scaler.h.
References DHrectBound< t_pow >::get(), DRange::hi, DHrectBound< t_pow >::Init(), and DRange::lo.
Referenced by main().
static void DatasetScaler::StandardizeData | ( | Matrix & | qset, | |
Matrix & | rset, | |||
bool | queries_equal_references | |||
) | [inline, static] |
Standardize the given query and the reference datasets in each dimension to have zero mean and at most unit variance.
Assumes that the query and the reference together contain more than one instance.
qset | The column-oriented query set. | |
rset | The column-oriented reference set. | |
queries_equal_references | The boolean flag that tells whether the queries equal the references. |
Definition at line 180 of file dataset_scaler.h.
References linalg__private::AddTo(), GenVector< T >::Init(), GenVector< T >::ptr(), linalg__private::Scale(), GenVector< T >::SetZero(), and math::Sqr().
Referenced by main().
static void DatasetScaler::TranslateDataByMin | ( | Matrix & | qset, | |
Matrix & | rset, | |||
bool | queries_equal_references | |||
) | [inline, static] |
Scale the given query and the reference datasets to lie in the positive quadrant.
qset | The column-oriented query set. | |
rset | The column-oriented reference set. | |
queries_equal_references | The boolean flag that tells whether the queries equal the references. |
Definition at line 67 of file dataset_scaler.h.
References DHrectBound< t_pow >::get(), DRange::hi, DHrectBound< t_pow >::Init(), and DRange::lo.