14 #ifndef MLPACK_METHODS_SVDPLUSPLUS_SVDPLUSPLUS_HPP 15 #define MLPACK_METHODS_SVDPLUSPLUS_SVDPLUSPLUS_HPP 20 #include <ensmallen.hpp> 75 template<
typename OptimizerType = ens::StandardSGD>
88 const double alpha = 0.001,
89 const double lambda = 0.1);
104 void Apply(
const arma::mat& data,
105 const arma::mat& implicitData,
127 void Apply(
const arma::mat& data,
138 static void CleanData(
const arma::mat& implicitData,
139 arma::sp_mat& cleanedData,
140 const arma::mat& data);
155 #include "svdplusplus_impl.hpp" SVD++ is a matrix decomposition tenique used in collaborative filtering.
SVDPlusPlus(const size_t iterations=10, const double alpha=0.001, const double lambda=0.1)
Constructor of SVDPlusPlus.
Linear algebra utility functions, generally performed on matrices or vectors.
static void CleanData(const arma::mat &implicitData, arma::sp_mat &cleanedData, const arma::mat &data)
Converts the User, Item matrix of implicit data to Item-User Table.
The core includes that mlpack expects; standard C++ includes and Armadillo.
void Apply(const arma::mat &data, const arma::mat &implicitData, const size_t rank, arma::mat &u, arma::mat &v, arma::vec &p, arma::vec &q, arma::mat &y)
Trains the model and obtains user/item matrices, user/item bias, and item implicit matrix...