# SuanShu, a Java numerical and statistical library

com.numericalmethod.suanshu.model.daspremont2008

## Class IndependentCoVAR

• java.lang.Object
• com.numericalmethod.suanshu.model.daspremont2008.IndependentCoVAR

• public class IndependentCoVAR
extends Object
This algorithm finds the independent variables based on the covariance matrix. First this algorithm starts with x1, and finds all the xi that are related to x1. Then add them (including x1) to group 1. Then this algorithm selects the first variable,xk, that is not in group 1, and finds all the variables related to xk. And add them to group 2. This procedure goes on until all the variables are in one of the groups.
• ### Constructor Summary

Constructors
Constructor and Description
IndependentCoVAR(Matrix cov, double tol)
Runs the algorithm with the given covariance matrix.
• ### Method Summary

All Methods
Modifier and Type Method and Description
int groupCount()
Returns the total number of independent groups.
List<List<Integer>> groups()
Returns the grouped variable indices.
• ### Methods inherited from class java.lang.Object

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

• #### IndependentCoVAR

public IndependentCoVAR(Matrix cov,
double tol)
Runs the algorithm with the given covariance matrix.
Parameters:
cov - the covariance matrix
tol - the tolerance, two variables are considered as independent if their covariance is smaller than the tolerance
• ### Method Detail

• #### groups

public List<List<Integer>> groups()
Returns the grouped variable indices. The variables in one list are independent to variables in other lists.
Returns:
the grouped variable indices
• #### groupCount

public int groupCount()
Returns the total number of independent groups.
Returns:
the total number of independent groups