This normalization class performs z-score normalization on raw ratings. More...
Public Member Functions | |
ZScoreNormalization () | |
double | Denormalize (const size_t, const size_t, const double rating) const |
Denormalize computed rating by adding mean and multiplying stddev. More... | |
void | Denormalize (const arma::Mat< size_t > &, arma::vec &predictions) const |
Denormalize computed rating by adding mean and multiplying stddev. More... | |
double | Mean () const |
Return mean. More... | |
void | Normalize (arma::mat &data) |
Normalize the data to zero mean and one standard deviation. More... | |
void | Normalize (arma::sp_mat &cleanedData) |
Normalize the data to zero mean and one standard deviation. More... | |
template < typename Archive > | |
void | serialize (Archive &ar, const uint32_t) |
Serialization. More... | |
double | Stddev () const |
Return stddev. More... | |
This normalization class performs z-score normalization on raw ratings.
An example of how to use ZScoreNormalization in CF is shown below:
Definition at line 38 of file z_score_normalization.hpp.
|
inline |
Definition at line 42 of file z_score_normalization.hpp.
|
inline |
Denormalize computed rating by adding mean and multiplying stddev.
* | (user) User ID. |
* | (item) Item ID. |
rating | Computed rating before denormalization. |
Definition at line 115 of file z_score_normalization.hpp.
|
inline |
Denormalize computed rating by adding mean and multiplying stddev.
* | (combinations) User/Item combinations. |
predictions | Predicted ratings for each user/item combination. |
Definition at line 128 of file z_score_normalization.hpp.
|
inline |
Return mean.
Definition at line 137 of file z_score_normalization.hpp.
|
inline |
Normalize the data to zero mean and one standard deviation.
data | Input dataset in the form of coordinate list. |
Definition at line 49 of file z_score_normalization.hpp.
References Log::Fatal.
|
inline |
Normalize the data to zero mean and one standard deviation.
cleanedData | Input data as a sparse matrix. |
Definition at line 76 of file z_score_normalization.hpp.
References Log::Fatal.
|
inline |
Serialization.
Definition at line 154 of file z_score_normalization.hpp.
|
inline |
Return stddev.
Definition at line 145 of file z_score_normalization.hpp.