other versions
- jessie 1.0.10-1
mlpack::svd::RegularizedSVDFunction(3) | MLPACK | mlpack::svd::RegularizedSVDFunction(3) |
NAME¶
mlpack::svd::RegularizedSVDFunction -SYNOPSIS¶
Public Member Functions¶
RegularizedSVDFunction (const arma::mat &data, const size_t rank, const double lambda)
Private Attributes¶
const arma::mat & data
Detailed Description¶
Definition at line 32 of file regularized_svd_function.hpp.Constructor & Destructor Documentation¶
mlpack::svd::RegularizedSVDFunction::RegularizedSVDFunction (const arma::mat &data, const size_trank, const doublelambda)¶
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.
Member Function Documentation¶
const arma::mat& mlpack::svd::RegularizedSVDFunction::Dataset () const [inline]¶
Return the dataset passed into the constructor. Definition at line 80 of file regularized_svd_function.hpp. References data.double mlpack::svd::RegularizedSVDFunction::Evaluate (const arma::mat ¶meters) const¶
Evaluates the cost function over all examples in the data. Parameters:parameters Parameters(user/item matrices) of the
decomposition.
double mlpack::svd::RegularizedSVDFunction::Evaluate (const arma::mat ¶meters, const size_ti) const¶
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.
const arma::mat& mlpack::svd::RegularizedSVDFunction::GetInitialPoint () const [inline]¶
Return the initial point for the optimization. Definition at line 77 of file regularized_svd_function.hpp. References initialPoint.void mlpack::svd::RegularizedSVDFunction::Gradient (const arma::mat ¶meters, arma::mat &gradient) const¶
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.
double mlpack::svd::RegularizedSVDFunction::Lambda () const [inline]¶
Return the regularization parameters. Definition at line 92 of file regularized_svd_function.hpp. References lambda.size_t mlpack::svd::RegularizedSVDFunction::NumFunctions () const [inline]¶
Return the number of training examples. Useful for SGD optimizer. Definition at line 83 of file regularized_svd_function.hpp.size_t mlpack::svd::RegularizedSVDFunction::NumItems () const [inline]¶
Return the number of items in the data. Definition at line 89 of file regularized_svd_function.hpp. References numItems.size_t mlpack::svd::RegularizedSVDFunction::NumUsers () const [inline]¶
Return the number of users in the data. Definition at line 86 of file regularized_svd_function.hpp. References numUsers.size_t mlpack::svd::RegularizedSVDFunction::Rank () const [inline]¶
Return the rank used for the factorization. Definition at line 95 of file regularized_svd_function.hpp. References rank.Member Data Documentation¶
const arma::mat& mlpack::svd::RegularizedSVDFunction::data [private]¶
Rating data. Definition at line 99 of file regularized_svd_function.hpp. Referenced by Dataset().arma::mat mlpack::svd::RegularizedSVDFunction::initialPoint [private]¶
Initial parameter point. Definition at line 101 of file regularized_svd_function.hpp. Referenced by GetInitialPoint().double mlpack::svd::RegularizedSVDFunction::lambda [private]¶
Regularization parameter for the optimization. Definition at line 105 of file regularized_svd_function.hpp. Referenced by Lambda().size_t mlpack::svd::RegularizedSVDFunction::numItems [private]¶
Number of items in the given dataset. Definition at line 109 of file regularized_svd_function.hpp. Referenced by NumItems().size_t mlpack::svd::RegularizedSVDFunction::numUsers [private]¶
Number of users in the given dataset. Definition at line 107 of file regularized_svd_function.hpp. Referenced by NumUsers().size_t mlpack::svd::RegularizedSVDFunction::rank [private]¶
Rank used for matrix factorization. Definition at line 103 of file regularized_svd_function.hpp. Referenced by Rank().Author¶
Generated automatically by Doxygen for MLPACK from the source code.Tue Sep 9 2014 | Version 1.0.10 |