mlpack
3.1.1
src
mlpack
methods
matrix_completion
matrix_completion.hpp
Go to the documentation of this file.
1
13
#ifndef MLPACK_METHODS_MATRIX_COMPLETION_MATRIX_COMPLETION_HPP
14
#define MLPACK_METHODS_MATRIX_COMPLETION_MATRIX_COMPLETION_HPP
15
16
#include <ensmallen.hpp>
17
18
namespace
mlpack
{
19
namespace
matrix_completion {
20
52
class
MatrixCompletion
53
{
54
public
:
67
MatrixCompletion
(
const
size_t
m,
68
const
size_t
n,
69
const
arma::umat& indices,
70
const
arma::vec& values,
71
const
size_t
r);
72
85
MatrixCompletion
(
const
size_t
m,
86
const
size_t
n,
87
const
arma::umat& indices,
88
const
arma::vec& values,
89
const
arma::mat& initialPoint);
90
101
MatrixCompletion
(
const
size_t
m,
102
const
size_t
n,
103
const
arma::umat& indices,
104
const
arma::vec& values);
105
111
void
Recover
(arma::mat& recovered);
112
114
const
ens::LRSDP<ens::SDP<arma::sp_mat>>&
Sdp
()
const
115
{
116
return
sdp;
117
}
119
ens::LRSDP<ens::SDP<arma::sp_mat>>&
Sdp
() {
return
sdp; }
120
121
private
:
123
size_t
m;
125
size_t
n;
127
arma::umat indices;
129
arma::mat values;
130
132
ens::LRSDP<ens::SDP<arma::sp_mat>> sdp;
133
135
void
CheckValues();
137
void
InitSDP();
138
141
static
size_t
DefaultRank(
const
size_t
m,
const
size_t
n,
const
size_t
p);
142
};
143
144
}
// namespace matrix_completion
145
}
// namespace mlpack
146
147
#endif
mlpack::matrix_completion::MatrixCompletion::MatrixCompletion
MatrixCompletion(const size_t m, const size_t n, const arma::umat &indices, const arma::vec &values, const size_t r)
Construct a matrix completion problem, specifying the maximum rank of the solution.
mlpack
@serialization.hpp
Definition:
add_to_po.hpp:21
mlpack::matrix_completion::MatrixCompletion::Sdp
ens::LRSDP< ens::SDP< arma::sp_mat > > & Sdp()
Modify the underlying SDP.
Definition:
matrix_completion.hpp:119
mlpack::matrix_completion::MatrixCompletion::Recover
void Recover(arma::mat &recovered)
Solve the underlying SDP to fill in the remaining values.
mlpack::matrix_completion::MatrixCompletion
This class implements the popular nuclear norm minimization heuristic for matrix completion problems.
Definition:
matrix_completion.hpp:52
mlpack::matrix_completion::MatrixCompletion::Sdp
const ens::LRSDP< ens::SDP< arma::sp_mat > > & Sdp() const
Return the underlying SDP.
Definition:
matrix_completion.hpp:114
Generated by
1.8.17