jml.recovery
Class MatrixCompletion

java.lang.Object
  extended by jml.recovery.MatrixCompletion

public class MatrixCompletion
extends java.lang.Object

A Java implementation of matrix completion which solves the following convex optimization problem:
min ||A||_*
s.t. D = A + E
E(Omega) = 0
where ||.||_* denotes the nuclear norm of a matrix (i.e., the sum of its singular values).

Inexact augmented Lagrange multiplers is used to solve the optimization problem due to its empirically fast convergence speed and proved convergence to the true optimal solution. Input:
D: an observation matrix with columns as data vectors
Omega: a sparse or dense logical matrix indicating the indices of samples
Output:
A: a low-rank matrix completed from the data matrix D
E: error matrix between D and A

Version:
1.0 Nov. 22nd, 2013
Author:
Mingjie Qian

Field Summary
(package private)  org.apache.commons.math.linear.RealMatrix A
          A low-rank matrix recovered from the corrupted data observation matrix D.
(package private)  org.apache.commons.math.linear.RealMatrix D
          Observation real matrix.
(package private)  org.apache.commons.math.linear.RealMatrix E
          Error matrix between the original observation matrix D and the low-rank recovered matrix A.
(package private)  org.apache.commons.math.linear.RealMatrix Omega
          a sparse or dense logical matrix indicating the indices of samples
 
Constructor Summary
MatrixCompletion()
          Constructor.
 
Method Summary
 void feedData(org.apache.commons.math.linear.RealMatrix D)
          Feed an observation matrix.
 void feedIndices(int[] indices)
          Feed indices of samples.
 void feedIndices(org.apache.commons.math.linear.RealMatrix Omega)
          Feed indices of samples.
 org.apache.commons.math.linear.RealMatrix GetErrorMatrix()
          Get the error matrix between the original observation matrix and its low-rank completed matrix.
 org.apache.commons.math.linear.RealMatrix GetLowRankEstimation()
          Get the low-rank completed matrix.
static void main(java.lang.String[] args)
           
 org.apache.commons.math.linear.RealMatrix[] matrixCompletion(org.apache.commons.math.linear.RealMatrix D, int[] indices)
          Do matrix completion which solves the following convex optimization problem:
min ||A||_*
s.t.
 org.apache.commons.math.linear.RealMatrix[] matrixCompletion(org.apache.commons.math.linear.RealMatrix D, org.apache.commons.math.linear.RealMatrix Omega)
          Do matrix completion which solves the following convex optimization problem:
min ||A||_*
s.t.
 void run()
          Run matrix completion.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

D

org.apache.commons.math.linear.RealMatrix D
Observation real matrix.


Omega

org.apache.commons.math.linear.RealMatrix Omega
a sparse or dense logical matrix indicating the indices of samples


A

org.apache.commons.math.linear.RealMatrix A
A low-rank matrix recovered from the corrupted data observation matrix D.


E

org.apache.commons.math.linear.RealMatrix E
Error matrix between the original observation matrix D and the low-rank recovered matrix A.

Constructor Detail

MatrixCompletion

public MatrixCompletion()
Constructor.

Method Detail

main

public static void main(java.lang.String[] args)
Parameters:
args -

feedData

public void feedData(org.apache.commons.math.linear.RealMatrix D)
Feed an observation matrix.

Parameters:
D - a real matrix

feedIndices

public void feedIndices(org.apache.commons.math.linear.RealMatrix Omega)
Feed indices of samples.

Parameters:
Omega - a sparse or dense logical matrix indicating the indices of samples

feedIndices

public void feedIndices(int[] indices)
Feed indices of samples.

Parameters:
indices - an int array for the indices of samples

run

public void run()
Run matrix completion.


GetLowRankEstimation

public org.apache.commons.math.linear.RealMatrix GetLowRankEstimation()
Get the low-rank completed matrix.

Returns:
the low-rank completed matrix

GetErrorMatrix

public org.apache.commons.math.linear.RealMatrix GetErrorMatrix()
Get the error matrix between the original observation matrix and its low-rank completed matrix.

Returns:
error matrix

matrixCompletion

public org.apache.commons.math.linear.RealMatrix[] matrixCompletion(org.apache.commons.math.linear.RealMatrix D,
                                                                    org.apache.commons.math.linear.RealMatrix Omega)
Do matrix completion which solves the following convex optimization problem:
min ||A||_*
s.t. D = A + E
E(Omega) = 0
where ||.||_* denotes the nuclear norm of a matrix (i.e., the sum of its singular values).

Inexact augmented Lagrange multipliers is used to solve the optimization problem due to its empirically fast convergence speed and proved convergence to the true optimal solution.

Parameters:
D - a real observation matrix
Omega - a sparse or dense logical matrix indicating the indices of samples
Returns:
a RealMatrix array [A, E] where A is the low-rank completion from D, and E is the error matrix between A and D

matrixCompletion

public org.apache.commons.math.linear.RealMatrix[] matrixCompletion(org.apache.commons.math.linear.RealMatrix D,
                                                                    int[] indices)
Do matrix completion which solves the following convex optimization problem:
min ||A||_*
s.t. D = A + E
E(Omega) = 0
where ||.||_* denotes the nuclear norm of a matrix (i.e., the sum of its singular values).

Inexact augmented Lagrange multipliers is used to solve the optimization problem due to its empirically fast convergence speed and proved convergence to the true optimal solution.

Parameters:
D - a real observation matrix
indices - an int array for the indices of samples
Returns:
a RealMatrix array [A, E] where A is the low-rank completion from D, and E is the error matrix between A and D