Go to the documentation of this file.
14 #ifndef MLPACK_METHODS_BIAS_SVD_BIAS_SVD_FUNCTION_HPP
15 #define MLPACK_METHODS_BIAS_SVD_BIAS_SVD_FUNCTION_HPP
18 #include <ensmallen.hpp>
30 template <
typename MatType = arma::mat>
58 double Evaluate(
const arma::mat& parameters)
const;
69 double Evaluate(
const arma::mat& parameters,
71 const size_t batchSize = 1)
const;
81 void Gradient(
const arma::mat& parameters,
82 arma::mat& gradient)
const;
97 template <
typename GradType>
98 void Gradient(
const arma::mat& parameters,
101 const size_t batchSize = 1)
const;
107 const arma::mat&
Dataset()
const {
return data; }
122 size_t Rank()
const {
return rank; }
128 arma::mat initialPoint;
152 inline double StandardSGD::Optimize(
154 arma::mat& parameters);
158 inline double ParallelSGD<ExponentialBackoff>::Optimize(
160 arma::mat& parameters);
164 #include "bias_svd_function_impl.hpp"
double Lambda() const
Return the regularization parameters.
const arma::mat & Dataset() const
Return the dataset passed into the constructor.
BiasSVDFunction(const MatType &data, const size_t rank, const double lambda)
Constructor for BiasSVDFunction class.
const arma::mat & GetInitialPoint() const
Return the initial point for the optimization.
size_t NumFunctions() const
Return the number of training examples. Useful for SGD optimizer.
double Evaluate(const arma::mat ¶meters) const
Evaluates the cost function over all examples in the data.
This class contains methods which are used to calculate the cost of BiasSVD's objective function,...
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 NumUsers() const
Return the number of users in the data.
void Shuffle()
Shuffle the points in the dataset.
size_t NumItems() const
Return the number of items in the data.
size_t Rank() const
Return the rank used for the factorization.