This normalization class performs a sequence of normalization methods on raw ratings. More...
Public Types | |
using | TupleType = std::tuple< NormalizationTypes... > |
Public Member Functions | |
CombinedNormalization () | |
double | Denormalize (const size_t user, const size_t item, const double rating) const |
Denormalize rating by calling Denormalize() in each normalization object. More... | |
void | Denormalize (const arma::Mat< size_t > &combinations, arma::vec &predictions) const |
Denormalize rating by calling Denormalize() in each normalization object. More... | |
const TupleType & | Normalizations () const |
Return normalizations tuple. More... | |
template < typename MatType > | |
void | Normalize (MatType &data) |
Normalize the data by calling Normalize() in each normalization object. More... | |
template < typename Archive > | |
void | serialize (Archive &ar, const uint32_t version) |
Serialization. More... | |
This normalization class performs a sequence of normalization methods on raw ratings.
An example of how to use CombinedNormalization in CF is shown below:
Definition at line 44 of file combined_normalization.hpp.
using TupleType = std::tuple<NormalizationTypes...> |
Definition at line 47 of file combined_normalization.hpp.
|
inline |
Definition at line 50 of file combined_normalization.hpp.
|
inline |
Denormalize rating by calling Denormalize() in each normalization object.
Note that the order of objects calling Denormalize() should be the reversed order of objects calling Normalize().
user | User ID. |
item | Item ID. |
rating | Computed rating before denormalization. |
Definition at line 72 of file combined_normalization.hpp.
Referenced by CombinedNormalization< NormalizationTypes >::serialize().
|
inline |
Denormalize rating by calling Denormalize() in each normalization object.
Note that the order of objects calling Denormalize() should be the reversed order of objects calling Normalize().
combinations | User/Item combinations. |
predictions | Predicted ratings for each user/item combination. |
Definition at line 87 of file combined_normalization.hpp.
|
inline |
Return normalizations tuple.
Definition at line 96 of file combined_normalization.hpp.
|
inline |
Normalize the data by calling Normalize() in each normalization object.
data | Input dataset. |
Definition at line 58 of file combined_normalization.hpp.
Referenced by CombinedNormalization< NormalizationTypes >::serialize().
|
inline |
Serialization.
Definition at line 105 of file combined_normalization.hpp.
References CombinedNormalization< NormalizationTypes >::Denormalize(), and CombinedNormalization< NormalizationTypes >::Normalize().