Mlpack::svd::regularizedsvdfunction -
RegularizedSVDFunction (const arma::mat &data, const size_t rank, const double lambda)
Constructor for RegularizedSVDFunction class. const arma::mat & Dataset () const
Return the dataset passed into the constructor. double Evaluate (const arma::mat ¶meters) const
Evaluates the cost function over all examples in the data. double Evaluate (const arma::mat ¶meters, const size_t i) const
Evaluates the cost function for one training example. const arma::mat & GetInitialPoint () const
Return the initial point for the optimization. void Gradient (const arma::mat ¶meters, arma::mat &gradient) const
Evaluates the full gradient of the cost function over all the training examples. double Lambda () const
Return the regularization parameters. size_t NumFunctions () const
Return the number of training examples. Useful for SGD optimizer. size_t NumItems () const
Return the number of items in the data. size_t NumUsers () const
Return the number of users in the data. size_t Rank () const
Return the rank used for the factorization.
const arma::mat & data
Rating data. arma::mat initialPoint
Initial parameter point. double lambda
Regularization parameter for the optimization. size_t numItems
Number of items in the given dataset. size_t numUsers
Number of users in the given dataset. size_t rank
Rank used for matrix factorization.
Definition at line 32 of file regularized_svd_function.hpp.
Constructor for RegularizedSVDFunction class. The constructor calculates the number of users and items in the passed data. It also randomly initializes the parameter values.
Parameters:
data Dataset for which SVD is calculated.
rank Rank used for matrix factorization.
lambda Regularization parameter used for optimization.
Return the dataset passed into the constructor.
Definition at line 80 of file regularized_svd_function.hpp.
References data.
Evaluates the cost function over all examples in the data.
Parameters:
parameters Parameters(user/item matrices) of the decomposition.
Evaluates the cost function for one training example. Useful for the SGD optimizer abstraction which uses one training example at a time.
Parameters:
parameters Parameters(user/item matrices) of the decomposition.
i Index of the training example to be used.
Return the initial point for the optimization.
Definition at line 77 of file regularized_svd_function.hpp.
References initialPoint.
Evaluates the full gradient of the cost function over all the training examples.
Parameters:
parameters Parameters(user/item matrices) of the decomposition.
gradient Calculated gradient for the parameters.
Return the regularization parameters.
Definition at line 92 of file regularized_svd_function.hpp.
References lambda.
Return the number of training examples. Useful for SGD optimizer.
Definition at line 83 of file regularized_svd_function.hpp.
Return the number of items in the data.
Definition at line 89 of file regularized_svd_function.hpp.
References numItems.
Return the number of users in the data.
Definition at line 86 of file regularized_svd_function.hpp.
References numUsers.
Return the rank used for the factorization.
Definition at line 95 of file regularized_svd_function.hpp.
References rank.
Rating data.
Definition at line 99 of file regularized_svd_function.hpp.
Referenced by Dataset().
Initial parameter point.
Definition at line 101 of file regularized_svd_function.hpp.
Referenced by GetInitialPoint().
Regularization parameter for the optimization.
Definition at line 105 of file regularized_svd_function.hpp.
Referenced by Lambda().
Number of items in the given dataset.
Definition at line 109 of file regularized_svd_function.hpp.
Referenced by NumItems().
Number of users in the given dataset.
Definition at line 107 of file regularized_svd_function.hpp.
Referenced by NumUsers().
Rank used for matrix factorization.
Definition at line 103 of file regularized_svd_function.hpp.
Referenced by Rank().
Generated automatically by Doxygen for MLPACK from the source code.