# SuanShu, a Java numerical and statistical library

## Class CovarianceSelectionProblem

• java.lang.Object

• public class CovarianceSelectionProblem
extends Object
This class defines the covariance selection problem outlined in d'Aspremont (2008). This technique is first used in Dempster (1972) and has some recent advancement, see for instance, Banerjee et al. (2007).
• A. d'Aspremont, "Identifying small mean reverting portfolios," Working Paper, 2008.
• A. Dempster, "Covariance selection," Biometrics, Volume: 28, 157 - 175, 1972.
• ### Constructor Summary

Constructors
Constructor and Description
CovarianceSelectionProblem(CovarianceSelectionProblem that)
Copy constructor.
CovarianceSelectionProblem(Matrix S, double t)
Constructs a covariance selection problem.
CovarianceSelectionProblem(MultivariateTimeSeries ts, double t)
Constructs a covariance selection problem from a multivariate time series.
CovarianceSelectionProblem(MultivariateTimeSeries ts, double t, boolean isCor)
Constructs a covariance selection problem from a multivariate time series.
• ### Method Summary

All Methods
Modifier and Type Method and Description
double penalizedCardinality(Matrix X)
Gets the value of a cardinality-penalized function.
double penalizedL1(Matrix X)
Gets the value of an L1-penalized function.
ImmutableMatrix S()
Gets the original sample covariance matrix.
double t()
Gets the penalization parameter t for L1 regularization.
• ### Methods inherited from class java.lang.Object

clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
• ### Constructor Detail

• #### CovarianceSelectionProblem

public CovarianceSelectionProblem(Matrix S,
double t)
Constructs a covariance selection problem.
Parameters:
S - a sample covariance (or correlation) matrix
t - the penalization parameter t for L1 regularization
• #### CovarianceSelectionProblem

public CovarianceSelectionProblem(MultivariateTimeSeries ts,
double t,
boolean isCor)
Constructs a covariance selection problem from a multivariate time series.
Parameters:
ts - a multivariate time series
t - the penalization parameter t for L1 regularization
isCor - indicator of whether sample correlation matrix is used instead of the covariance matrix
• #### CovarianceSelectionProblem

public CovarianceSelectionProblem(MultivariateTimeSeries ts,
double t)
Constructs a covariance selection problem from a multivariate time series. By default, the sample covariance matrix is used in the calculation.
Parameters:
ts - a multivariate time series
t - the penalization parameter t for L1 regularization
• #### CovarianceSelectionProblem

public CovarianceSelectionProblem(CovarianceSelectionProblem that)
Copy constructor.
Parameters:
that - another CovarianceSelectionProblem
• ### Method Detail

• #### S

public ImmutableMatrix S()
Gets the original sample covariance matrix.
Returns:
the original sample covariance matrix
• #### t

public double t()
Gets the penalization parameter t for L1 regularization.
Returns:
the penalization parameter t for L1 regularization
• #### penalizedL1

public double penalizedL1(Matrix X)
Gets the value of an L1-penalized function.
Parameters:
X - the inverse of a covariance matrix (to be estimated)
Returns:
the value of an L1-penalized function
public double penalizedCardinality(Matrix X)
X - the inverse of a covariance matrix (to be estimated)