\section{Matrix\+Completion Class Reference}
\label{classmlpack_1_1matrix__completion_1_1MatrixCompletion}\index{Matrix\+Completion@{Matrix\+Completion}}


This class implements the popular nuclear norm minimization heuristic for matrix completion problems.  


\subsection*{Public Member Functions}
\begin{DoxyCompactItemize}
\item 
\textbf{ Matrix\+Completion} (const size\+\_\+t m, const size\+\_\+t n, const arma\+::umat \&indices, const arma\+::vec \&values, const size\+\_\+t r)
\begin{DoxyCompactList}\small\item\em Construct a matrix completion problem, specifying the maximum rank of the solution. \end{DoxyCompactList}\item 
\textbf{ Matrix\+Completion} (const size\+\_\+t m, const size\+\_\+t n, const arma\+::umat \&indices, const arma\+::vec \&values, const arma\+::mat \&initial\+Point)
\begin{DoxyCompactList}\small\item\em Construct a matrix completion problem, specifying the initial point of the optimization. \end{DoxyCompactList}\item 
\textbf{ Matrix\+Completion} (const size\+\_\+t m, const size\+\_\+t n, const arma\+::umat \&indices, const arma\+::vec \&values)
\begin{DoxyCompactList}\small\item\em Construct a matrix completion problem. \end{DoxyCompactList}\item 
void \textbf{ Recover} (arma\+::mat \&recovered)
\begin{DoxyCompactList}\small\item\em Solve the underlying S\+DP to fill in the remaining values. \end{DoxyCompactList}\item 
const ens\+::\+L\+R\+S\+DP$<$ ens\+::\+S\+DP$<$ arma\+::sp\+\_\+mat $>$ $>$ \& \textbf{ Sdp} () const
\begin{DoxyCompactList}\small\item\em Return the underlying S\+DP. \end{DoxyCompactList}\item 
ens\+::\+L\+R\+S\+DP$<$ ens\+::\+S\+DP$<$ arma\+::sp\+\_\+mat $>$ $>$ \& \textbf{ Sdp} ()
\begin{DoxyCompactList}\small\item\em Modify the underlying S\+DP. \end{DoxyCompactList}\end{DoxyCompactItemize}


\subsection{Detailed Description}
This class implements the popular nuclear norm minimization heuristic for matrix completion problems. 

That is, given known values M\+\_\+ij\textquotesingle{}s, the following optimization problem (semi-\/definite program) is solved to fill in the remaining unknown values of X

min $\vert$$\vert$\+X$\vert$$\vert$\+\_\+$\ast$ subj to X\+\_\+ij = M\+\_\+ij

where $\vert$$\vert$\+X$\vert$$\vert$\+\_\+$\ast$ denotes the nuclear norm (sum of singular values of X).

For a theoretical treatment of the conditions necessary for exact recovery, see the following paper\+:

A Simpler Appoarch to Matrix Completion. Benjamin Recht. J\+M\+LR 11. {\tt http\+://arxiv.\+org/pdf/0910.\+0651v2.\+pdf}

An example of how to use this class is shown below\+:


\begin{DoxyCode}
\textcolor{keywordtype}{size\_t} m, n;         \textcolor{comment}{// size of unknown matrix}
arma::umat indices;  \textcolor{comment}{// contains the known indices [2 x n\_entries]}
arma::vec values;    \textcolor{comment}{// contains the known values [n\_entries]}
arma::mat recovered; \textcolor{comment}{// will contain the completed matrix}

MatrixCompletion mc(m, n, indices, values);
mc.Recover(recovered);
\end{DoxyCode}


\begin{DoxySeeAlso}{See also}
L\+R\+S\+DP 
\end{DoxySeeAlso}


Definition at line 52 of file matrix\+\_\+completion.\+hpp.



\subsection{Constructor \& Destructor Documentation}
\mbox{\label{classmlpack_1_1matrix__completion_1_1MatrixCompletion_a5f500c0e84f8afe5603571983f88339b}} 
\index{mlpack\+::matrix\+\_\+completion\+::\+Matrix\+Completion@{mlpack\+::matrix\+\_\+completion\+::\+Matrix\+Completion}!Matrix\+Completion@{Matrix\+Completion}}
\index{Matrix\+Completion@{Matrix\+Completion}!mlpack\+::matrix\+\_\+completion\+::\+Matrix\+Completion@{mlpack\+::matrix\+\_\+completion\+::\+Matrix\+Completion}}
\subsubsection{Matrix\+Completion()\hspace{0.1cm}{\footnotesize\ttfamily [1/3]}}
{\footnotesize\ttfamily \textbf{ Matrix\+Completion} (\begin{DoxyParamCaption}\item[{const size\+\_\+t}]{m,  }\item[{const size\+\_\+t}]{n,  }\item[{const arma\+::umat \&}]{indices,  }\item[{const arma\+::vec \&}]{values,  }\item[{const size\+\_\+t}]{r }\end{DoxyParamCaption})}



Construct a matrix completion problem, specifying the maximum rank of the solution. 


\begin{DoxyParams}{Parameters}
{\em m} & Number of rows of original matrix. \\
\hline
{\em n} & Number of columns of original matrix. \\
\hline
{\em indices} & Matrix containing the indices of the known entries (must be [2 x p]). \\
\hline
{\em values} & Vector containing the values of the known entries (must be length p). \\
\hline
{\em r} & Maximum rank of solution. \\
\hline
\end{DoxyParams}
\mbox{\label{classmlpack_1_1matrix__completion_1_1MatrixCompletion_a8c29debbb3dcafbcbef2959136870bfc}} 
\index{mlpack\+::matrix\+\_\+completion\+::\+Matrix\+Completion@{mlpack\+::matrix\+\_\+completion\+::\+Matrix\+Completion}!Matrix\+Completion@{Matrix\+Completion}}
\index{Matrix\+Completion@{Matrix\+Completion}!mlpack\+::matrix\+\_\+completion\+::\+Matrix\+Completion@{mlpack\+::matrix\+\_\+completion\+::\+Matrix\+Completion}}
\subsubsection{Matrix\+Completion()\hspace{0.1cm}{\footnotesize\ttfamily [2/3]}}
{\footnotesize\ttfamily \textbf{ Matrix\+Completion} (\begin{DoxyParamCaption}\item[{const size\+\_\+t}]{m,  }\item[{const size\+\_\+t}]{n,  }\item[{const arma\+::umat \&}]{indices,  }\item[{const arma\+::vec \&}]{values,  }\item[{const arma\+::mat \&}]{initial\+Point }\end{DoxyParamCaption})}



Construct a matrix completion problem, specifying the initial point of the optimization. 


\begin{DoxyParams}{Parameters}
{\em m} & Number of rows of original matrix. \\
\hline
{\em n} & Number of columns of original matrix. \\
\hline
{\em indices} & Matrix containing the indices of the known entries (must be [2 x p]). \\
\hline
{\em values} & Vector containing the values of the known entries (must be length p). \\
\hline
{\em initial\+Point} & Starting point for the S\+DP optimization. \\
\hline
\end{DoxyParams}
\mbox{\label{classmlpack_1_1matrix__completion_1_1MatrixCompletion_aeb772507cd8f576eceedf6edc52d0ef3}} 
\index{mlpack\+::matrix\+\_\+completion\+::\+Matrix\+Completion@{mlpack\+::matrix\+\_\+completion\+::\+Matrix\+Completion}!Matrix\+Completion@{Matrix\+Completion}}
\index{Matrix\+Completion@{Matrix\+Completion}!mlpack\+::matrix\+\_\+completion\+::\+Matrix\+Completion@{mlpack\+::matrix\+\_\+completion\+::\+Matrix\+Completion}}
\subsubsection{Matrix\+Completion()\hspace{0.1cm}{\footnotesize\ttfamily [3/3]}}
{\footnotesize\ttfamily \textbf{ Matrix\+Completion} (\begin{DoxyParamCaption}\item[{const size\+\_\+t}]{m,  }\item[{const size\+\_\+t}]{n,  }\item[{const arma\+::umat \&}]{indices,  }\item[{const arma\+::vec \&}]{values }\end{DoxyParamCaption})}



Construct a matrix completion problem. 


\begin{DoxyParams}{Parameters}
{\em m} & Number of rows of original matrix. \\
\hline
{\em n} & Number of columns of original matrix. \\
\hline
{\em indices} & Matrix containing the indices of the known entries (must be [2 x p]). \\
\hline
{\em values} & Vector containing the values of the known entries (must be length p). \\
\hline
\end{DoxyParams}


\subsection{Member Function Documentation}
\mbox{\label{classmlpack_1_1matrix__completion_1_1MatrixCompletion_aa758764911348e5540da0ffd092eba75}} 
\index{mlpack\+::matrix\+\_\+completion\+::\+Matrix\+Completion@{mlpack\+::matrix\+\_\+completion\+::\+Matrix\+Completion}!Recover@{Recover}}
\index{Recover@{Recover}!mlpack\+::matrix\+\_\+completion\+::\+Matrix\+Completion@{mlpack\+::matrix\+\_\+completion\+::\+Matrix\+Completion}}
\subsubsection{Recover()}
{\footnotesize\ttfamily void Recover (\begin{DoxyParamCaption}\item[{arma\+::mat \&}]{recovered }\end{DoxyParamCaption})}



Solve the underlying S\+DP to fill in the remaining values. 


\begin{DoxyParams}{Parameters}
{\em recovered} & Will contain the completed matrix. \\
\hline
\end{DoxyParams}
\mbox{\label{classmlpack_1_1matrix__completion_1_1MatrixCompletion_ac1d73e9809358a87bd0092a77f8f00be}} 
\index{mlpack\+::matrix\+\_\+completion\+::\+Matrix\+Completion@{mlpack\+::matrix\+\_\+completion\+::\+Matrix\+Completion}!Sdp@{Sdp}}
\index{Sdp@{Sdp}!mlpack\+::matrix\+\_\+completion\+::\+Matrix\+Completion@{mlpack\+::matrix\+\_\+completion\+::\+Matrix\+Completion}}
\subsubsection{Sdp()\hspace{0.1cm}{\footnotesize\ttfamily [1/2]}}
{\footnotesize\ttfamily const ens\+::\+L\+R\+S\+DP$<$ens\+::\+S\+DP$<$arma\+::sp\+\_\+mat$>$ $>$\& Sdp (\begin{DoxyParamCaption}{ }\end{DoxyParamCaption}) const\hspace{0.3cm}{\ttfamily [inline]}}



Return the underlying S\+DP. 



Definition at line 114 of file matrix\+\_\+completion.\+hpp.

\mbox{\label{classmlpack_1_1matrix__completion_1_1MatrixCompletion_a67f1f8713360e9c83a12f1ad735d7f8d}} 
\index{mlpack\+::matrix\+\_\+completion\+::\+Matrix\+Completion@{mlpack\+::matrix\+\_\+completion\+::\+Matrix\+Completion}!Sdp@{Sdp}}
\index{Sdp@{Sdp}!mlpack\+::matrix\+\_\+completion\+::\+Matrix\+Completion@{mlpack\+::matrix\+\_\+completion\+::\+Matrix\+Completion}}
\subsubsection{Sdp()\hspace{0.1cm}{\footnotesize\ttfamily [2/2]}}
{\footnotesize\ttfamily ens\+::\+L\+R\+S\+DP$<$ens\+::\+S\+DP$<$arma\+::sp\+\_\+mat$>$ $>$\& Sdp (\begin{DoxyParamCaption}{ }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [inline]}}



Modify the underlying S\+DP. 



Definition at line 119 of file matrix\+\_\+completion.\+hpp.



The documentation for this class was generated from the following file\+:\begin{DoxyCompactItemize}
\item 
/var/www/mlpack.\+ratml.\+org/mlpack.\+org/\+\_\+src/mlpack-\/3.\+3.\+2/src/mlpack/methods/matrix\+\_\+completion/\textbf{ matrix\+\_\+completion.\+hpp}\end{DoxyCompactItemize}
