This class performs average interpolation to generate interpolation weights for neighborhood-based collaborative filtering. More...
|AverageInterpolation (const arma::sp_mat &)|
|This constructor is needed for interface consistency. More...|
|void||GetWeights (VectorType &&weights, const DecompositionPolicy &, const size_t, const arma::Col< size_t > &neighbors, const arma::vec &, const arma::sp_mat &)|
|Interoplation weights are identical and sum up to one. More...|
This class performs average interpolation to generate interpolation weights for neighborhood-based collaborative filtering.
An example of how to use AverageInterpolation in CF is shown below:
Interoplation weights are identical and sum up to one.
After getting the weights, CF algorithm multiplies each neighbor's rating by its corresponding weight and sums them to get predicted rating.
|weights||Resulting interpolation weights. The size of weights should be set to the number of neighbors before calling GetWeights().|
|neighbors||Neighbors of queried user.|
|similarities||Similarites between query user and neighbors.|
|cleanedData||Sparse rating matrix.|