| return distance;
}
public static void main(String[] args) {
// 2.1, 3.5, 8. , 9.5
Matrix x = InMemoryJBlasMatrix.randn(4);
x.put(0, 0, 2.1);
x.put(1, 0, 3.5);
x.put(2, 0, 8.0);
x.put(3, 0, 9.5);
Matrix mu = InMemoryJBlasMatrix.zeros(4);
mu.put(0, 0, 2.0);
mu.put(1, 0, 3.0);
mu.put(2, 0, 8.0);
mu.put(3, 0, 10.0);
Matrix Sigma = InMemoryJBlasMatrix.eye(4);
Sigma.put(0, 0, 2.3);
Sigma.put(1, 1, 1.5);
Sigma.put(2, 2, 1.7);
Sigma.put(3, 3, 2.0);
System.out.println("Det: " + Sigma.det());
System.out.println("Normal density: " + Gaussian.mphi(x, mu, Sigma));
// System.out.println("PDF: " + Gaussian.pdf());
double y = 0.1;
double mean = 1.5;
|