Overview | Package | Class | Tree | Deprecated | Index | Help
| ContactCenters V. 0.9.9.
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## umontreal.iro.lecuyer.contactcenters.contact
Class CorrelationMatrixCorrector

    java.lang.Object
      umontreal.iro.lecuyer.contactcenters.contact.CorrelationMatrixCorrector

    public class CorrelationMatrixCorrector

extends Object

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.

Author:
  Boris N. Oreshkin

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

### Rin

    public DoubleMatrix2D Rin

### Rout

    public DoubleMatrix2D Rout

### D

    public DoubleMatrix2D D

### V

    public DoubleMatrix2D V

Constructor Detail

### CorrelationMatrixCorrector

    public CorrelationMatrixCorrector(int maxit,
                                      double epsilon,
                                      double[][] Rin)

  Constructs CorrelationMatrixCorrector object from the correlations matrix Rin. Sets maximum number of iterations equal to maxit and the number, which is used to substitute the negative eigenvalues, equal to epsilon. The correlation matrix Rin must be symmetric.

  Parameters:
    `maxit` - Maximum number of iterations
    `epsilon` - Number used to replace the negative eigenvalues
    `Rin` - Input correlation matrix

### CorrelationMatrixCorrector

    public CorrelationMatrixCorrector(double[][] Rin)

  Constructs CorrelationMatrixCorrector object from the correlations matrix Rin. Sets `maxit` and `epsilon` to default values of 100 and 1e-3 respectively.

  Parameters:
    `Rin` - the input correlation matrix

Method Detail

### getRout

    public double[][] getRout()

  Returns the corrected positive definite correlation matrix.

  Returns:
    the positive definite correlation matrix

### getEpsilon

    public double getEpsilon()

  Returns the number, which is used to substitute for the negative eigenvalues.

  Returns:
    value replacing negative eigenvalues

### getMaxit

    public int getMaxit()

  Returns the maximum number of iterations in the algorithm.

  Returns:
    maximum number of iterations

### setMaxit

    public void setMaxit(int maxit)

  Sets the maximum number of iterations in the algorithm.

  Parameters:
    `maxit` - The maximum number of iterations in the algorithm.

### setEpsilon

    public void setEpsilon(double epsilon)

  Sets the number, which is used to substitute the negative eigenvalues in the POSDEF algorithm

  Parameters:
    `epsilon` - The positive number, which is used to substitute the negative eigenvalues in the POSDEF algorithm

### setEpsilonLoading

    public void setEpsilonLoading(double epsilonLoading)

  Sets the number, which is used to scale the identity matrix in the diagonal loading algorithm

  Parameters:
    `epsilonLoading` - The positive number, which is used to scale the identity matrix in the diagonal loading algorithm

### calcCorrectedR

    public double[][] calcCorrectedR()

  Calculate the corrected correlation matrix according to the posdef algorithm proposed by Davenport and Iman.

  Returns:
    Corrected correlation matrix in 2D double array.

Overview | Package | Class | Tree | Deprecated | Index | Help
| ContactCenters V. 0.9.9.
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

To submit a bug or ask questions, send an e-mail to Richard Simard.