|
| RegularizedSVDFunction (const arma::mat &data, const size_t rank, const double lambda) |
| Constructor for RegularizedSVDFunction class. More...
|
|
const arma::mat & | Dataset () const |
| Return the dataset passed into the constructor. More...
|
|
double | Evaluate (const arma::mat ¶meters) const |
| Evaluates the cost function over all examples in the data. More...
|
|
double | Evaluate (const arma::mat ¶meters, const size_t i) const |
| Evaluates the cost function for one training example. More...
|
|
const arma::mat & | GetInitialPoint () const |
| Return the initial point for the optimization. More...
|
|
void | Gradient (const arma::mat ¶meters, arma::mat &gradient) const |
| Evaluates the full gradient of the cost function over all the training examples. More...
|
|
double | Lambda () const |
| Return the regularization parameters. More...
|
|
size_t | NumFunctions () const |
| Return the number of training examples. Useful for SGD optimizer. More...
|
|
size_t | NumItems () const |
| Return the number of items in the data. More...
|
|
size_t | NumUsers () const |
| Return the number of users in the data. More...
|
|
size_t | Rank () const |
| Return the rank used for the factorization. More...
|
|
Constructor for RegularizedSVDFunction class.
The constructor calculates the number of users and items in the passed data. It also randomly initializes the parameter values.
- Parameters
-
data | Dataset for which SVD is calculated. |
rank | Rank used for matrix factorization. |
lambda | Regularization parameter used for optimization. |
const arma::mat& Dataset |
( |
| ) |
const |
|
inline |
double Evaluate |
( |
const arma::mat & |
parameters | ) |
const |
Evaluates the cost function over all examples in the data.
- Parameters
-
parameters | Parameters(user/item matrices) of the decomposition. |
double Evaluate |
( |
const arma::mat & |
parameters, |
|
|
const size_t |
i |
|
) |
| const |
Evaluates the cost function for one training example.
Useful for the SGD optimizer abstraction which uses one training example at a time.
- Parameters
-
parameters | Parameters(user/item matrices) of the decomposition. |
i | Index of the training example to be used. |
const arma::mat& GetInitialPoint |
( |
| ) |
const |
|
inline |
void Gradient |
( |
const arma::mat & |
parameters, |
|
|
arma::mat & |
gradient |
|
) |
| const |
Evaluates the full gradient of the cost function over all the training examples.
- Parameters
-
parameters | Parameters(user/item matrices) of the decomposition. |
gradient | Calculated gradient for the parameters. |
size_t NumFunctions |
( |
| ) |
const |
|
inline |
size_t NumItems |
( |
| ) |
const |
|
inline |
size_t NumUsers |
( |
| ) |
const |
|
inline |
The documentation for this class was generated from the following file: