Wishart { public double getEntropy() { return -lnB() - 0.5 * (nu - D - 1) * expectationLnLambda() + nu * D / 2.; } Wishart(RealMatrix omega, double nu); double lnB(); double getEntropy(); double getExpectationLogDeterminantLambda();  }
@Test public void entropyTest() { double[][] matrixArray; matrixArray = new double[][]{{1, 0}, {0, 1}}; assertEquals(3.953808582067758, new Wishart(new BlockRealMatrix(matrixArray), 2).getEntropy(), 1e-7); matrixArray = new double[][]{{2, 1}, {1, 2}}; assertEquals(8.4584668123359084, new Wishart(new BlockRealMatrix(matrixArray), 5).getEntropy(), 1e-7); }