13 #ifndef MLPACK_METHODS_REGULARIZED_SVD_REGULARIZED_FUNCTION_SVD_HPP 14 #define MLPACK_METHODS_REGULARIZED_SVD_REGULARIZED_FUNCTION_SVD_HPP 17 #include <ensmallen.hpp> 28 template <
typename MatType = arma::mat>
55 double Evaluate(
const arma::mat& parameters)
const;
65 double Evaluate(
const arma::mat& parameters,
67 const size_t batchSize = 1)
const;
76 void Gradient(
const arma::mat& parameters,
77 arma::mat& gradient)
const;
91 template <
typename GradType>
92 void Gradient(
const arma::mat& parameters,
95 const size_t batchSize = 1)
const;
101 const arma::mat&
Dataset()
const {
return data; }
116 size_t Rank()
const {
return rank; }
122 arma::mat initialPoint;
150 inline double StandardSGD::Optimize(
152 arma::mat& parameters);
156 inline double ParallelSGD<ExponentialBackoff>::Optimize(
158 arma::mat& parameters);
void Shuffle()
Shuffle the points in the dataset.
Definition: regularized_svd_function_impl.hpp:38
size_t NumFunctions() const
Return the number of training examples. Useful for SGD optimizer.
Definition: regularized_svd_function.hpp:104
size_t NumUsers() const
Return the number of users in the data.
Definition: regularized_svd_function.hpp:107
const arma::mat & GetInitialPoint() const
Return the initial point for the optimization.
Definition: regularized_svd_function.hpp:98
Linear algebra utility functions, generally performed on matrices or vectors.
Definition: cv.hpp:1
Definition: bias_svd_function_impl.hpp:185
size_t Rank() const
Return the rank used for the factorization.
Definition: regularized_svd_function.hpp:116
The core includes that mlpack expects; standard C++ includes and Armadillo.
double Evaluate(const arma::mat ¶meters) const
Evaluates the cost function over all examples in the data.
Definition: regularized_svd_function_impl.hpp:45
void Gradient(const arma::mat ¶meters, arma::mat &gradient) const
Evaluates the full gradient of the cost function over all the training examples.
Definition: regularized_svd_function_impl.hpp:90
const arma::mat & Dataset() const
Return the dataset passed into the constructor.
Definition: regularized_svd_function.hpp:101
double Lambda() const
Return the regularization parameters.
Definition: regularized_svd_function.hpp:113
RegularizedSVDFunction(const MatType &data, const size_t rank, const double lambda)
Constructor for RegularizedSVDFunction class.
Definition: regularized_svd_function_impl.hpp:22
size_t NumItems() const
Return the number of items in the data.
Definition: regularized_svd_function.hpp:110
The data is stored in a matrix of type MatType, so that this class can be used with both dense and sp...
Definition: regularized_svd_function.hpp:29