mlpack
3.4.2
mlpack-3.4.2
src
mlpack
methods
bias_svd
bias_svd.hpp
Go to the documentation of this file.
1
14
#ifndef MLPACK_METHODS_BIAS_SVD_BIAS_SVD_HPP
15
#define MLPACK_METHODS_BIAS_SVD_BIAS_SVD_HPP
16
17
#include <
mlpack/prereqs.hpp
>
18
#include <ensmallen.hpp>
19
#include <
mlpack/methods/cf/cf.hpp
>
20
21
#include "
bias_svd_function.hpp
"
22
23
namespace
mlpack
{
24
namespace
svd {
25
56
template
<
typename
OptimizerType = ens::StandardSGD>
57
class
BiasSVD
58
{
59
public
:
68
BiasSVD
(
const
size_t
iterations = 10,
69
const
double
alpha = 0.02,
70
const
double
lambda = 0.05);
71
82
void
Apply
(
const
arma::mat& data,
83
const
size_t
rank,
84
arma::mat& u,
85
arma::mat& v,
86
arma::vec& p,
87
arma::vec& q);
88
89
private
:
91
size_t
iterations;
93
double
alpha;
95
double
lambda;
96
};
97
98
}
// namespace svd
99
}
// namespace mlpack
100
101
// Include implementation.
102
#include "bias_svd_impl.hpp"
103
104
#endif
mlpack::svd::BiasSVD
Bias SVD is an improvement on Regularized SVD which is a matrix factorization techniques.
Definition:
bias_svd.hpp:58
prereqs.hpp
The core includes that mlpack expects; standard C++ includes and Armadillo.
bias_svd_function.hpp
mlpack
Linear algebra utility functions, generally performed on matrices or vectors.
Definition:
add_to_cli11.hpp:21
cf.hpp
mlpack::svd::BiasSVD::Apply
void Apply(const arma::mat &data, const size_t rank, arma::mat &u, arma::mat &v, arma::vec &p, arma::vec &q)
Trains the model and obtains user/item matrices and user/item bias.
mlpack::svd::BiasSVD::BiasSVD
BiasSVD(const size_t iterations=10, const double alpha=0.02, const double lambda=0.05)
Constructor of Bias SVD.
Generated by
1.8.20