.TH "mlpack::svd::RegularizedSVDFunction" 3 "Tue Sep 9 2014" "Version 1.0.10" "MLPACK" \" -*- nroff -*- .ad l .nh .SH NAME mlpack::svd::RegularizedSVDFunction \- .SH SYNOPSIS .br .PP .SS "Public Member Functions" .in +1c .ti -1c .RI "\fBRegularizedSVDFunction\fP (const arma::mat &\fBdata\fP, const size_t \fBrank\fP, const double \fBlambda\fP)" .br .RI "\fIConstructor for \fBRegularizedSVDFunction\fP class\&. \fP" .ti -1c .RI "const arma::mat & \fBDataset\fP () const " .br .RI "\fIReturn the dataset passed into the constructor\&. \fP" .ti -1c .RI "double \fBEvaluate\fP (const arma::mat ¶meters) const " .br .RI "\fIEvaluates the cost function over all examples in the data\&. \fP" .ti -1c .RI "double \fBEvaluate\fP (const arma::mat ¶meters, const size_t i) const " .br .RI "\fIEvaluates the cost function for one training example\&. \fP" .ti -1c .RI "const arma::mat & \fBGetInitialPoint\fP () const " .br .RI "\fIReturn the initial point for the optimization\&. \fP" .ti -1c .RI "void \fBGradient\fP (const arma::mat ¶meters, arma::mat &gradient) const " .br .RI "\fIEvaluates the full gradient of the cost function over all the training examples\&. \fP" .ti -1c .RI "double \fBLambda\fP () const " .br .RI "\fIReturn the regularization parameters\&. \fP" .ti -1c .RI "size_t \fBNumFunctions\fP () const " .br .RI "\fIReturn the number of training examples\&. Useful for SGD optimizer\&. \fP" .ti -1c .RI "size_t \fBNumItems\fP () const " .br .RI "\fIReturn the number of items in the data\&. \fP" .ti -1c .RI "size_t \fBNumUsers\fP () const " .br .RI "\fIReturn the number of users in the data\&. \fP" .ti -1c .RI "size_t \fBRank\fP () const " .br .RI "\fIReturn the rank used for the factorization\&. \fP" .in -1c .SS "Private Attributes" .in +1c .ti -1c .RI "const arma::mat & \fBdata\fP" .br .RI "\fIRating data\&. \fP" .ti -1c .RI "arma::mat \fBinitialPoint\fP" .br .RI "\fIInitial parameter point\&. \fP" .ti -1c .RI "double \fBlambda\fP" .br .RI "\fIRegularization parameter for the optimization\&. \fP" .ti -1c .RI "size_t \fBnumItems\fP" .br .RI "\fINumber of items in the given dataset\&. \fP" .ti -1c .RI "size_t \fBnumUsers\fP" .br .RI "\fINumber of users in the given dataset\&. \fP" .ti -1c .RI "size_t \fBrank\fP" .br .RI "\fIRank used for matrix factorization\&. \fP" .in -1c .SH "Detailed Description" .PP Definition at line 32 of file regularized_svd_function\&.hpp\&. .SH "Constructor & Destructor Documentation" .PP .SS "mlpack::svd::RegularizedSVDFunction::RegularizedSVDFunction (const arma::mat &data, const size_trank, const doublelambda)" .PP Constructor for \fBRegularizedSVDFunction\fP class\&. The constructor calculates the number of users and items in the passed data\&. It also randomly initializes the parameter values\&. .PP \fBParameters:\fP .RS 4 \fIdata\fP Dataset for which SVD is calculated\&. .br \fIrank\fP Rank used for matrix factorization\&. .br \fIlambda\fP Regularization parameter used for optimization\&. .RE .PP .SH "Member Function Documentation" .PP .SS "const arma::mat& mlpack::svd::RegularizedSVDFunction::Dataset () const\fC [inline]\fP" .PP Return the dataset passed into the constructor\&. .PP Definition at line 80 of file regularized_svd_function\&.hpp\&. .PP References data\&. .SS "double mlpack::svd::RegularizedSVDFunction::Evaluate (const arma::mat ¶meters) const" .PP Evaluates the cost function over all examples in the data\&. .PP \fBParameters:\fP .RS 4 \fIparameters\fP Parameters(user/item matrices) of the decomposition\&. .RE .PP .SS "double mlpack::svd::RegularizedSVDFunction::Evaluate (const arma::mat ¶meters, const size_ti) const" .PP Evaluates the cost function for one training example\&. Useful for the SGD optimizer abstraction which uses one training example at a time\&. .PP \fBParameters:\fP .RS 4 \fIparameters\fP Parameters(user/item matrices) of the decomposition\&. .br \fIi\fP Index of the training example to be used\&. .RE .PP .SS "const arma::mat& mlpack::svd::RegularizedSVDFunction::GetInitialPoint () const\fC [inline]\fP" .PP Return the initial point for the optimization\&. .PP Definition at line 77 of file regularized_svd_function\&.hpp\&. .PP References initialPoint\&. .SS "void mlpack::svd::RegularizedSVDFunction::Gradient (const arma::mat ¶meters, arma::mat &gradient) const" .PP Evaluates the full gradient of the cost function over all the training examples\&. .PP \fBParameters:\fP .RS 4 \fIparameters\fP Parameters(user/item matrices) of the decomposition\&. .br \fIgradient\fP Calculated gradient for the parameters\&. .RE .PP .SS "double mlpack::svd::RegularizedSVDFunction::Lambda () const\fC [inline]\fP" .PP Return the regularization parameters\&. .PP Definition at line 92 of file regularized_svd_function\&.hpp\&. .PP References lambda\&. .SS "size_t mlpack::svd::RegularizedSVDFunction::NumFunctions () const\fC [inline]\fP" .PP Return the number of training examples\&. Useful for SGD optimizer\&. .PP Definition at line 83 of file regularized_svd_function\&.hpp\&. .SS "size_t mlpack::svd::RegularizedSVDFunction::NumItems () const\fC [inline]\fP" .PP Return the number of items in the data\&. .PP Definition at line 89 of file regularized_svd_function\&.hpp\&. .PP References numItems\&. .SS "size_t mlpack::svd::RegularizedSVDFunction::NumUsers () const\fC [inline]\fP" .PP Return the number of users in the data\&. .PP Definition at line 86 of file regularized_svd_function\&.hpp\&. .PP References numUsers\&. .SS "size_t mlpack::svd::RegularizedSVDFunction::Rank () const\fC [inline]\fP" .PP Return the rank used for the factorization\&. .PP Definition at line 95 of file regularized_svd_function\&.hpp\&. .PP References rank\&. .SH "Member Data Documentation" .PP .SS "const arma::mat& mlpack::svd::RegularizedSVDFunction::data\fC [private]\fP" .PP Rating data\&. .PP Definition at line 99 of file regularized_svd_function\&.hpp\&. .PP Referenced by Dataset()\&. .SS "arma::mat mlpack::svd::RegularizedSVDFunction::initialPoint\fC [private]\fP" .PP Initial parameter point\&. .PP Definition at line 101 of file regularized_svd_function\&.hpp\&. .PP Referenced by GetInitialPoint()\&. .SS "double mlpack::svd::RegularizedSVDFunction::lambda\fC [private]\fP" .PP Regularization parameter for the optimization\&. .PP Definition at line 105 of file regularized_svd_function\&.hpp\&. .PP Referenced by Lambda()\&. .SS "size_t mlpack::svd::RegularizedSVDFunction::numItems\fC [private]\fP" .PP Number of items in the given dataset\&. .PP Definition at line 109 of file regularized_svd_function\&.hpp\&. .PP Referenced by NumItems()\&. .SS "size_t mlpack::svd::RegularizedSVDFunction::numUsers\fC [private]\fP" .PP Number of users in the given dataset\&. .PP Definition at line 107 of file regularized_svd_function\&.hpp\&. .PP Referenced by NumUsers()\&. .SS "size_t mlpack::svd::RegularizedSVDFunction::rank\fC [private]\fP" .PP Rank used for matrix factorization\&. .PP Definition at line 103 of file regularized_svd_function\&.hpp\&. .PP Referenced by Rank()\&. .SH "Author" .PP Generated automatically by Doxygen for MLPACK from the source code\&.