The model to save to disk. More...

Public Types

enum  DecompositionTypes
{
  NMF
,
  BATCH_SVD
,
  RANDOMIZED_SVD
,
  REG_SVD
,
  SVD_COMPLETE
,
  SVD_INCOMPLETE
,
  BIAS_SVD
,
  SVD_PLUS_PLUS

}
 
enum  NormalizationTypes
{
  NO_NORMALIZATION
,
  ITEM_MEAN_NORMALIZATION
,
  USER_MEAN_NORMALIZATION
,
  OVERALL_MEAN_NORMALIZATION
,
  Z_SCORE_NORMALIZATION

}
 

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...

 
CFWrapperBaseCF () const
 Get the CFWrapperBase object. (Be careful!) More...

 
const DecompositionTypesDecompositionType () const
 Get the decomposition type. More...

 
DecompositionTypesDecompositionType ()
 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 NormalizationTypesNormalizationType () const
 Get the normalization type. More...

 
NormalizationTypesNormalizationType ()
 Set the normalization type. More...

 
CFModeloperator= (const CFModel &other)
 Make this CF model a copy of the other model. More...

 
CFModeloperator= (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...

 

Detailed Description

The model to save to disk.

Definition at line 162 of file cf_model.hpp.

Member Enumeration Documentation

◆ 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.

◆ 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.

Constructor & Destructor Documentation

◆ CFModel() [1/3]

CFModel ( )

Create an empty CF model.

◆ CFModel() [2/3]

CFModel ( const CFModel other)

Create a CF model by copying the given model.

◆ CFModel() [3/3]

CFModel ( CFModel &&  other)

Create a CF model by taking ownership of the data of the other model.

◆ ~CFModel()

~CFModel ( )

Clean up memory.

Member Function Documentation

◆ CF()

CFWrapperBase* CF ( ) const
inline

Get the CFWrapperBase object. (Be careful!)

Definition at line 219 of file cf_model.hpp.

◆ DecompositionType() [1/2]

const DecompositionTypes& DecompositionType ( ) const
inline

Get the decomposition type.

Definition at line 222 of file cf_model.hpp.

◆ DecompositionType() [2/2]

DecompositionTypes& DecompositionType ( )
inline

Set the decomposition type.

Definition at line 227 of file cf_model.hpp.

◆ GetRecommendations() [1/2]

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.

◆ GetRecommendations() [2/2]

void GetRecommendations ( const NeighborSearchTypes  nsType,
const InterpolationTypes  interpolationType,
const size_t  numRecs,
arma::Mat< size_t > &  recommendations 
)

Compute recommendations for all users.

◆ NormalizationType() [1/2]

const NormalizationTypes& NormalizationType ( ) const
inline

Get the normalization type.

Definition at line 233 of file cf_model.hpp.

◆ NormalizationType() [2/2]

NormalizationTypes& NormalizationType ( )
inline

Set the normalization type.

Definition at line 238 of file cf_model.hpp.

References CFWrapperBase::GetRecommendations(), and CFWrapperBase::Predict().

◆ operator=() [1/2]

CFModel& operator= ( const CFModel other)

Make this CF model a copy of the other model.

◆ operator=() [2/2]

CFModel& operator= ( CFModel &&  other)

Make this CF model take ownership of the data of the other model.

◆ Predict()

void Predict ( const NeighborSearchTypes  nsType,
const InterpolationTypes  interpolationType,
const arma::Mat< size_t > &  combinations,
arma::vec &  predictions 
)

Make predictions.

◆ serialize()

void serialize ( Archive &  ar,
const uint32_t   
)

Serialize the model.

◆ Train()

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.


The documentation for this class was generated from the following file:
  • /home/jenkins-mlpack/mlpack.org/_src/mlpack-git/src/mlpack/methods/cf/cf_model.hpp