|
ContactCenters V. 0.9.9. |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectumontreal.iro.lecuyer.contactcenters.contact.CorrelationMatrixCorrector
public class CorrelationMatrixCorrector
Implements the algorithm POSDEF that transforms the approximate correlation matrix that may contain negative eigenvalues to the valid positive definite correlation matrix. The algorithm is described in Davenport, J. M. and Iman, R. L. (1982). An iterative algorithm to produce a positive definite correlation matrix from an approximate correlation matrix. Technical report, Sandia National Laboratories, Albuquerque, New Mexico. If the POSDEF algorithm fails to converge this implementation uses diagonal loading algorithm. In this case it returns the original matrix plus scaled identity matrix. The returned matrix is scaled so that the diagonal entries are equal to 1.
Field Summary | |
---|---|
DoubleMatrix2D |
D
|
DoubleMatrix2D |
Rin
|
DoubleMatrix2D |
Rout
|
DoubleMatrix2D |
V
|
Constructor Summary | |
---|---|
CorrelationMatrixCorrector(double[][] Rin)
Constructs CorrelationMatrixCorrector object from the correlations matrix Rin. |
|
CorrelationMatrixCorrector(int maxit,
double epsilon,
double[][] Rin)
Constructs CorrelationMatrixCorrector object from the correlations matrix Rin. |
Method Summary | |
---|---|
double[][] |
calcCorrectedR()
Calculate the corrected correlation matrix according to the posdef algorithm proposed by Davenport and Iman. |
double |
getEpsilon()
Returns the number, which is used to substitute for the negative eigenvalues. |
int |
getMaxit()
Returns the maximum number of iterations in the algorithm. |
double[][] |
getRout()
Returns the corrected positive definite correlation matrix. |
void |
setEpsilon(double epsilon)
Sets the number, which is used to substitute the negative eigenvalues in the POSDEF algorithm |
void |
setEpsilonLoading(double epsilonLoading)
Sets the number, which is used to scale the identity matrix in the diagonal loading algorithm |
void |
setMaxit(int maxit)
Sets the maximum number of iterations in the algorithm. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public DoubleMatrix2D Rin
public DoubleMatrix2D Rout
public DoubleMatrix2D D
public DoubleMatrix2D V
Constructor Detail |
---|
public CorrelationMatrixCorrector(int maxit, double epsilon, double[][] Rin)
maxit
- Maximum number of iterationsepsilon
- Number used to replace the negative eigenvaluesRin
- Input correlation matrixpublic CorrelationMatrixCorrector(double[][] Rin)
maxit
and epsilon
to default values of 100 and 1e-3
respectively.
Rin
- the input correlation matrixMethod Detail |
---|
public double[][] getRout()
public double getEpsilon()
public int getMaxit()
public void setMaxit(int maxit)
maxit
- The maximum number of iterations in the algorithm.public void setEpsilon(double epsilon)
epsilon
- The positive number, which is used to substitute the negative
eigenvalues in the POSDEF algorithmpublic void setEpsilonLoading(double epsilonLoading)
epsilonLoading
- The positive number, which is used to scale the identity matrix
in the diagonal loading algorithmpublic double[][] calcCorrectedR()
|
ContactCenters V. 0.9.9. |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |