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;
   156   inline double StandardSGD::Optimize(
   158       arma::mat& parameters);
   162   inline double ParallelSGD<ExponentialBackoff>::Optimize(
   164       arma::mat& parameters);
   172 #include "bias_svd_function_impl.hpp" Linear algebra utility functions, generally performed on matrices or vectors. 
 
size_t NumUsers() const
Return the number of users in the data. 
 
void Shuffle()
Shuffle the points in the dataset. 
 
The core includes that mlpack expects; standard C++ includes and Armadillo. 
 
This class contains methods which are used to calculate the cost of BiasSVD's objective function...
 
BiasSVDFunction(const MatType &data, const size_t rank, const double lambda)
Constructor for BiasSVDFunction class. 
 
size_t Rank() const
Return the rank used for the factorization. 
 
const arma::mat & GetInitialPoint() const
Return the initial point for the optimization. 
 
const arma::mat & Dataset() const
Return the dataset passed into the constructor. 
 
double Lambda() const
Return the regularization parameters. 
 
double Evaluate(const arma::mat ¶meters) const
Evaluates the cost function over all examples in the data. 
 
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 NumItems() const
Return the number of items in the data.