MLPACK  1.0.11
Public Member Functions | Private Attributes | List of all members
mlpack::svd::RegularizedSVD< OptimizerType > Class Template Reference
Collaboration diagram for mlpack::svd::RegularizedSVD< OptimizerType >:
Collaboration graph
[legend]

Public Member Functions

 RegularizedSVD (const arma::mat &data, arma::mat &u, arma::mat &v, const size_t rank, const size_t iterations=10, const double alpha=0.01, const double lambda=0.02)
 Constructor for Regularized SVD. More...
 

Private Attributes

double alpha
 Learning rate for the SGD optimizer. More...
 
const arma::mat & data
 Rating data. More...
 
size_t iterations
 Number of optimization iterations. More...
 
double lambda
 Regularization parameter for the optimization. More...
 
mlpack::optimization::SGD< RegularizedSVDFunctionoptimizer
 Default SGD optimizer for the class. More...
 
size_t rank
 Rank used for matrix factorization. More...
 
RegularizedSVDFunction rSVDFunc
 Function that will be held by the optimizer. More...
 

Detailed Description

template<template< typename > class OptimizerType = mlpack::optimization::SGD>
class mlpack::svd::RegularizedSVD< OptimizerType >

Definition at line 37 of file regularized_svd.hpp.

Constructor & Destructor Documentation

template<template< typename > class OptimizerType = mlpack::optimization::SGD>
mlpack::svd::RegularizedSVD< OptimizerType >::RegularizedSVD ( const arma::mat &  data,
arma::mat &  u,
arma::mat &  v,
const size_t  rank,
const size_t  iterations = 10,
const double  alpha = 0.01,
const double  lambda = 0.02 
)

Constructor for Regularized SVD.

Obtains the user and item matrices after training on the passed data. The constructor initiates an object of class RegularizedSVDFunction for optimization. It uses the SGD optimizer by default. The optimizer uses a template specialization of Optimize().

Parameters
dataDataset for which SVD is calculated.
uUser matrix in the matrix decomposition.
vItem matrix in the matrix decomposition.
rankRank used for matrix factorization.
iterationsNumber of optimization iterations.
lambdaRegularization parameter for the optimization.

Member Data Documentation

template<template< typename > class OptimizerType = mlpack::optimization::SGD>
double mlpack::svd::RegularizedSVD< OptimizerType >::alpha
private

Learning rate for the SGD optimizer.

Definition at line 70 of file regularized_svd.hpp.

template<template< typename > class OptimizerType = mlpack::optimization::SGD>
const arma::mat& mlpack::svd::RegularizedSVD< OptimizerType >::data
private

Rating data.

Definition at line 64 of file regularized_svd.hpp.

template<template< typename > class OptimizerType = mlpack::optimization::SGD>
size_t mlpack::svd::RegularizedSVD< OptimizerType >::iterations
private

Number of optimization iterations.

Definition at line 68 of file regularized_svd.hpp.

template<template< typename > class OptimizerType = mlpack::optimization::SGD>
double mlpack::svd::RegularizedSVD< OptimizerType >::lambda
private

Regularization parameter for the optimization.

Definition at line 72 of file regularized_svd.hpp.

template<template< typename > class OptimizerType = mlpack::optimization::SGD>
mlpack::optimization::SGD<RegularizedSVDFunction> mlpack::svd::RegularizedSVD< OptimizerType >::optimizer
private

Default SGD optimizer for the class.

Definition at line 76 of file regularized_svd.hpp.

template<template< typename > class OptimizerType = mlpack::optimization::SGD>
size_t mlpack::svd::RegularizedSVD< OptimizerType >::rank
private

Rank used for matrix factorization.

Definition at line 66 of file regularized_svd.hpp.

template<template< typename > class OptimizerType = mlpack::optimization::SGD>
RegularizedSVDFunction mlpack::svd::RegularizedSVD< OptimizerType >::rSVDFunc
private

Function that will be held by the optimizer.

Definition at line 74 of file regularized_svd.hpp.


The documentation for this class was generated from the following file: