MLPACK
1.0.10
Main Page
Related Pages
Namespaces
Classes
Files
File List
File Members
src
mlpack
methods
regularized_svd
regularized_svd.hpp
Go to the documentation of this file.
1
23
#ifndef __MLPACK_METHODS_REGULARIZED_SVD_REGULARIZED_SVD_HPP
24
#define __MLPACK_METHODS_REGULARIZED_SVD_REGULARIZED_SVD_HPP
25
26
#include <
mlpack/core.hpp
>
27
#include <
mlpack/core/optimizers/sgd/sgd.hpp
>
28
29
#include "
regularized_svd_function.hpp
"
30
31
namespace
mlpack {
32
namespace
svd {
33
34
template
<
35
template
<
typename
>
class
OptimizerType =
mlpack::optimization::SGD
36
>
37
class
RegularizedSVD
38
{
39
public
:
40
54
RegularizedSVD
(
const
arma::mat&
data
,
55
arma::mat& u,
56
arma::mat& v,
57
const
size_t
rank
,
58
const
size_t
iterations
= 10,
59
const
double
alpha
= 0.01,
60
const
double
lambda
= 0.02);
61
62
private
:
64
const
arma::mat&
data
;
66
size_t
rank
;
68
size_t
iterations
;
70
double
alpha
;
72
double
lambda
;
74
RegularizedSVDFunction
rSVDFunc
;
76
mlpack::optimization::SGD<RegularizedSVDFunction>
optimizer
;
77
};
78
79
};
// namespace svd
80
};
// namespace mlpack
81
82
// Include implementation.
83
#include "regularized_svd_impl.hpp"
84
85
#endif
mlpack::svd::RegularizedSVD::iterations
size_t iterations
Number of optimization iterations.
Definition:
regularized_svd.hpp:68
mlpack::svd::RegularizedSVD
Definition:
regularized_svd.hpp:37
mlpack::svd::RegularizedSVD::data
const arma::mat & data
Rating data.
Definition:
regularized_svd.hpp:64
mlpack::svd::RegularizedSVD::rank
size_t rank
Rank used for matrix factorization.
Definition:
regularized_svd.hpp:66
mlpack::svd::RegularizedSVD::lambda
double lambda
Regularization parameter for the optimization.
Definition:
regularized_svd.hpp:72
mlpack::svd::RegularizedSVD::alpha
double alpha
Learning rate for the SGD optimizer.
Definition:
regularized_svd.hpp:70
mlpack::svd::RegularizedSVD::rSVDFunc
RegularizedSVDFunction rSVDFunc
Function that will be held by the optimizer.
Definition:
regularized_svd.hpp:74
sgd.hpp
regularized_svd_function.hpp
core.hpp
mlpack::svd::RegularizedSVD::RegularizedSVD
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.
mlpack::optimization::SGD
Stochastic Gradient Descent is a technique for minimizing a function which can be expressed as a sum ...
Definition:
sgd.hpp:86
mlpack::svd::RegularizedSVDFunction
Definition:
regularized_svd_function.hpp:32
mlpack::svd::RegularizedSVD::optimizer
mlpack::optimization::SGD< RegularizedSVDFunction > optimizer
Default SGD optimizer for the class.
Definition:
regularized_svd.hpp:76
Generated on Tue Sep 9 2014 13:55:18 for MLPACK by
1.8.7