Class Covariance
java.lang.Object
Covariance
public class Covariance
- extends java.lang.Object
Covariance as the name sggests computes the covariance matrix given
two random vectors i.e., the X = (x1, x2, x3 ...) and Y = (y1, y2, y3 ...)
Method Summary |
double[][] |
computeCovariance(double[] x,
double[] y)
computes the covariance matrix given two discrete random variables |
void |
normalizeCovariance(double[][] M)
The method normalizes the covariance matrix based on the the range of
the values within the covariance matrix |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Covariance
public Covariance()
normalizeCovariance
public void normalizeCovariance(double[][] M)
- The method normalizes the covariance matrix based on the the range of
the values within the covariance matrix
- Parameters:
M
- covariance matrix
computeCovariance
public double[][] computeCovariance(double[] x,
double[] y)
- computes the covariance matrix given two discrete random variables
- Parameters:
x
- random vector X = (x1, x2, x3 ...)y
- random vector Y = (y1, y2, y3 ...)
- Returns:
- covariance matrix