The model to save to disk. More...
Public Member Functions | |
| CFModel () | |
| Create an empty CF model. More... | |
| CFModel (const CFModel &other) | |
| Create a CF model by copying the given model. More... | |
| CFModel (CFModel &&other) | |
| Create a CF model by taking ownership of the data of the other model. More... | |
| ~CFModel () | |
| Clean up memory. More... | |
| CFWrapperBase * | CF () const |
| Get the CFWrapperBase object. (Be careful!) More... | |
| const DecompositionTypes & | DecompositionType () const |
| Get the decomposition type. More... | |
| DecompositionTypes & | DecompositionType () |
| Set the decomposition type. More... | |
| void | GetRecommendations (const NeighborSearchTypes nsType, const InterpolationTypes interpolationType, const size_t numRecs, arma::Mat< size_t > &recommendations, const arma::Col< size_t > &users) |
| Compute recommendations for query users. More... | |
| void | GetRecommendations (const NeighborSearchTypes nsType, const InterpolationTypes interpolationType, const size_t numRecs, arma::Mat< size_t > &recommendations) |
| Compute recommendations for all users. More... | |
| const NormalizationTypes & | NormalizationType () const |
| Get the normalization type. More... | |
| NormalizationTypes & | NormalizationType () |
| Set the normalization type. More... | |
| CFModel & | operator= (const CFModel &other) |
| Make this CF model a copy of the other model. More... | |
| CFModel & | operator= (CFModel &&other) |
| Make this CF model take ownership of the data of the other model. More... | |
| void | Predict (const NeighborSearchTypes nsType, const InterpolationTypes interpolationType, const arma::Mat< size_t > &combinations, arma::vec &predictions) |
| Make predictions. More... | |
template < typename Archive > | |
| void | serialize (Archive &ar, const uint32_t) |
| Serialize the model. More... | |
| void | Train (const arma::mat &data, const size_t numUsersForSimilarity, const size_t rank, const size_t maxIterations, const double minResidue, const bool mit) |
| Train the model. More... | |
The model to save to disk.
Definition at line 162 of file cf_model.hpp.
| enum DecompositionTypes |
| Enumerator | |
|---|---|
| NMF | |
| BATCH_SVD | |
| RANDOMIZED_SVD | |
| REG_SVD | |
| SVD_COMPLETE | |
| SVD_INCOMPLETE | |
| BIAS_SVD | |
| SVD_PLUS_PLUS | |
Definition at line 165 of file cf_model.hpp.
| enum NormalizationTypes |
| Enumerator | |
|---|---|
| NO_NORMALIZATION | |
| ITEM_MEAN_NORMALIZATION | |
| USER_MEAN_NORMALIZATION | |
| OVERALL_MEAN_NORMALIZATION | |
| Z_SCORE_NORMALIZATION | |
Definition at line 177 of file cf_model.hpp.
| CFModel | ( | ) |
Create an empty CF model.
| ~CFModel | ( | ) |
Clean up memory.
|
inline |
Get the CFWrapperBase object. (Be careful!)
Definition at line 219 of file cf_model.hpp.
|
inline |
Get the decomposition type.
Definition at line 222 of file cf_model.hpp.
|
inline |
Set the decomposition type.
Definition at line 227 of file cf_model.hpp.
| void GetRecommendations | ( | const NeighborSearchTypes | nsType, |
| const InterpolationTypes | interpolationType, | ||
| const size_t | numRecs, | ||
| arma::Mat< size_t > & | recommendations, | ||
| const arma::Col< size_t > & | users | ||
| ) |
Compute recommendations for query users.
| void GetRecommendations | ( | const NeighborSearchTypes | nsType, |
| const InterpolationTypes | interpolationType, | ||
| const size_t | numRecs, | ||
| arma::Mat< size_t > & | recommendations | ||
| ) |
Compute recommendations for all users.
|
inline |
Get the normalization type.
Definition at line 233 of file cf_model.hpp.
|
inline |
Set the normalization type.
Definition at line 238 of file cf_model.hpp.
References CFWrapperBase::GetRecommendations(), and CFWrapperBase::Predict().
Make this CF model take ownership of the data of the other model.
| void Predict | ( | const NeighborSearchTypes | nsType, |
| const InterpolationTypes | interpolationType, | ||
| const arma::Mat< size_t > & | combinations, | ||
| arma::vec & | predictions | ||
| ) |
Make predictions.
| void serialize | ( | Archive & | ar, |
| const uint32_t | |||
| ) |
Serialize the model.
| void Train | ( | const arma::mat & | data, |
| const size_t | numUsersForSimilarity, | ||
| const size_t | rank, | ||
| const size_t | maxIterations, | ||
| const double | minResidue, | ||
| const bool | mit | ||
| ) |
Train the model.