CFWrapper< DecompositionPolicy, NormalizationPolicy > Class Template Reference

The CFWrapper class wraps the functionality of all CF types. More...

Inheritance diagram for CFWrapper< DecompositionPolicy, NormalizationPolicy >:

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

 
CFModelTypeCF ()
 Get the CFType object. More...

 
virtual CFWrapperClone () 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...

 

Detailed Description


template
<
typename
DecompositionPolicy
,
typename
NormalizationPolicy
>

class mlpack::cf::CFWrapper< DecompositionPolicy, NormalizationPolicy >

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.

Member Typedef Documentation

◆ CFModelType

typedef CFType<DecompositionPolicy, NormalizationPolicy> CFModelType
protected

Definition at line 91 of file cf_model.hpp.

Constructor & Destructor Documentation

◆ CFWrapper() [1/2]

CFWrapper ( )
inline

Create the CFWrapper object, using default parameters to initialize the held CF object.

Definition at line 96 of file cf_model.hpp.

◆ CFWrapper() [2/2]

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 
)
inline

Create the CFWrapper object, initializing the held CF object.

Definition at line 99 of file cf_model.hpp.

◆ ~CFWrapper()

virtual ~CFWrapper ( )
inlinevirtual

Destroy the CFWrapper object.

Definition at line 121 of file cf_model.hpp.

Member Function Documentation

◆ CF()

CFModelType& CF ( )
inline

Get the CFType object.

Definition at line 124 of file cf_model.hpp.

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

◆ Clone()

virtual CFWrapper* Clone ( ) const
inlinevirtual

Clone the CFWrapper object. This handles polymorphism correctly.

Implements CFWrapperBase.

Definition at line 118 of file cf_model.hpp.

◆ GetRecommendations() [1/2]

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

Compute recommendations for all users.

Implements CFWrapperBase.

◆ GetRecommendations() [2/2]

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

Compute recommendations.

Implements CFWrapperBase.

◆ Predict()

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

Compute predictions for users.

Implements CFWrapperBase.

◆ serialize()

void serialize ( Archive &  ar,
const uint32_t   
)
inline

Serialize the model.

Definition at line 149 of file cf_model.hpp.

Member Data Documentation

◆ cf

CFModelType cf
protected

This is the CF object that we are wrapping.

Definition at line 156 of file cf_model.hpp.


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