15 #ifndef __MLPACK_METHODS_REGULARIZED_SVD_REGULARIZED_FUNCTION_SVD_HPP 16 #define __MLPACK_METHODS_REGULARIZED_SVD_REGULARIZED_FUNCTION_SVD_HPP 46 double Evaluate(
const arma::mat& parameters)
const;
55 double Evaluate(
const arma::mat& parameters,
56 const size_t i)
const;
65 void Gradient(
const arma::mat& parameters,
66 arma::mat& gradient)
const;
108 namespace optimization {
116 double SGD<mlpack::svd::RegularizedSVDFunction>::Optimize(
117 arma::mat& parameters);
arma::mat initialPoint
Initial parameter point.
Linear algebra utility functions, generally performed on matrices or vectors.
double lambda
Regularization parameter for the optimization.
size_t NumUsers() const
Return the number of users in the data.
const arma::mat & data
Rating data.
double Evaluate(const arma::mat ¶meters) const
Evaluates the cost function over all examples in the data.
size_t Rank() const
Return the rank used for the factorization.
const arma::mat & GetInitialPoint() const
Return the initial point for the optimization.
size_t NumItems() const
Return the number of items in the data.
Include all of the base components required to write MLPACK methods, and the main MLPACK Doxygen docu...
const arma::mat & Dataset() const
Return the dataset passed into the constructor.
size_t numItems
Number of items in the given dataset.
size_t numUsers
Number of users in the given dataset.
size_t NumFunctions() const
Return the number of training examples. Useful for SGD optimizer.
void Gradient(const arma::mat ¶meters, arma::mat &gradient) const
Evaluates the full gradient of the cost function over all the training examples.
size_t rank
Rank used for matrix factorization.
double Lambda() const
Return the regularization parameters.
RegularizedSVDFunction(const arma::mat &data, const size_t rank, const double lambda)
Constructor for RegularizedSVDFunction class.