The CFWrapper class wraps the functionality of all CF types. More...
Public Member Functions | |
CFWrapper () | |
Create the CFWrapper object, using default parameters to initialize the held CF object. More... | |
CFWrapper (const arma::mat &data, const DecompositionPolicy &decomposition, const size_t numUsersForSimilarity, const size_t rank, const size_t maxIterations, const size_t minResidue, const bool mit) | |
Create the CFWrapper object, initializing the held CF object. More... | |
virtual | ~CFWrapper () |
Destroy the CFWrapper object. More... | |
CFModelType & | CF () |
Get the CFType object. More... | |
virtual CFWrapper * | Clone () const |
Clone the CFWrapper object. This handles polymorphism correctly. More... | |
virtual void | GetRecommendations (const NeighborSearchTypes nsType, const InterpolationTypes interpolationType, const size_t numRecs, arma::Mat< size_t > &recommendations) |
Compute recommendations for all users. More... | |
virtual 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. More... | |
virtual void | Predict (const NeighborSearchTypes nsType, const InterpolationTypes interpolationType, const arma::Mat< size_t > &combinations, arma::vec &predictions) |
Compute predictions for users. More... | |
template < typename Archive > | |
void | serialize (Archive &ar, const uint32_t) |
Serialize the model. More... | |
Public Member Functions inherited from CFWrapperBase | |
CFWrapperBase () | |
Create the object. The base class has nothing to hold. More... | |
virtual | ~CFWrapperBase () |
Delete the object. More... | |
Protected Types | |
typedef CFType< DecompositionPolicy, NormalizationPolicy > | CFModelType |
Protected Attributes | |
CFModelType | cf |
This is the CF object that we are wrapping. More... | |
The CFWrapper class wraps the functionality of all CF types.
If special handling is needed for a future CF type, this class can be extended.
Definition at line 88 of file cf_model.hpp.
|
protected |
Definition at line 91 of file cf_model.hpp.
|
inline |
Create the CFWrapper object, using default parameters to initialize the held CF object.
Definition at line 96 of file cf_model.hpp.
|
inline |
Create the CFWrapper object, initializing the held CF object.
Definition at line 99 of file cf_model.hpp.
|
inlinevirtual |
Destroy the CFWrapper object.
Definition at line 121 of file cf_model.hpp.
|
inline |
Get the CFType object.
Definition at line 124 of file cf_model.hpp.
References CFWrapperBase::GetRecommendations(), and CFWrapperBase::Predict().
|
inlinevirtual |
Clone the CFWrapper object. This handles polymorphism correctly.
Implements CFWrapperBase.
Definition at line 118 of file cf_model.hpp.
|
virtual |
Compute recommendations for all users.
Implements CFWrapperBase.
|
virtual |
Compute recommendations.
Implements CFWrapperBase.
|
virtual |
Compute predictions for users.
Implements CFWrapperBase.
|
inline |
Serialize the model.
Definition at line 149 of file cf_model.hpp.
|
protected |
This is the CF object that we are wrapping.
Definition at line 156 of file cf_model.hpp.