mlpack 3.4.2
|
The model to save to disk. More...
#include <cf_model.hpp>
Public Member Functions | |
CFModel () | |
Create an empty CF model. More... | |
~CFModel () | |
Clean up memory. More... | |
template<typename DecompositionPolicy , typename NormalizationType = NoNormalization> | |
const CFType< DecompositionPolicy, NormalizationType > * | CFPtr () const |
Get the pointer to CFType<> object. More... | |
template<typename NeighborSearchPolicy , typename InterpolationPolicy > | |
void | GetRecommendations (const size_t numRecs, arma::Mat< size_t > &recommendations) |
Compute recommendations for all users. More... | |
template<typename NeighborSearchPolicy , typename InterpolationPolicy > | |
void | GetRecommendations (const size_t numRecs, arma::Mat< size_t > &recommendations, const arma::Col< size_t > &users) |
Compute recommendations for query users. More... | |
template<typename NeighborSearchPolicy , typename InterpolationPolicy > | |
void | Predict (const arma::Mat< size_t > &combinations, arma::vec &predictions) |
Make predictions. More... | |
template<typename Archive > | |
void | serialize (Archive &ar, const unsigned int) |
Serialize the model. More... | |
template<typename DecompositionPolicy , typename MatType > | |
void | Train (const MatType &data, const size_t numUsersForSimilarity, const size_t rank, const size_t maxIterations, const double minResidue, const bool mit, const std::string &normalizationType="none") |
Train the model. More... | |
The model to save to disk.
Definition at line 121 of file cf_model.hpp.
|
inline |
Create an empty CF model.
Definition at line 177 of file cf_model.hpp.
~CFModel | ( | ) |
Clean up memory.
const CFType< DecompositionPolicy, NormalizationType > * CFPtr | ( | ) | const |
Get the pointer to CFType<> object.
void GetRecommendations | ( | const size_t | numRecs, |
arma::Mat< size_t > & | recommendations | ||
) |
Compute recommendations for all users.
void GetRecommendations | ( | const size_t | numRecs, |
arma::Mat< size_t > & | recommendations, | ||
const arma::Col< size_t > & | users | ||
) |
Compute recommendations for query users.
void Predict | ( | const arma::Mat< size_t > & | combinations, |
arma::vec & | predictions | ||
) |
Make predictions.
void serialize | ( | Archive & | ar, |
const unsigned int | |||
) |
Serialize the model.
void Train | ( | const MatType & | data, |
const size_t | numUsersForSimilarity, | ||
const size_t | rank, | ||
const size_t | maxIterations, | ||
const double | minResidue, | ||
const bool | mit, | ||
const std::string & | normalizationType = "none" |
||
) |
Train the model.