test_class.declarator: log = LoggerFactory.getLogger(MultivariateTDistributionTest.class)
test_class.modifier: private static final
test_class.original_string: private static final Logger log = LoggerFactory.getLogger(MultivariateTDistributionTest.class);
test_class.type: Logger
test_class.var_name: log
test_class.file: contrib/src/test/java/macrobase/analysis/stats/distribution/MultivariateTDistributionTest.java
test_class.identifier: MultivariateTDistributionTest
test_case.body: @Test
      public void testReductionToStudentT() {
          double mean = 0;
          double variance = 1;
          RealVector meanVector = new ArrayRealVector(1);
          meanVector.setEntry(0, mean);
          RealMatrix varianceMatrix = MatrixUtils.createRealIdentityMatrix(1).scalarMultiply(variance);
  
          int N = 4300;
          MultivariateTDistribution multiT = new MultivariateTDistribution(meanVector, varianceMatrix, N);
          TDistribution uniT = new TDistribution(N);
  
          double[] testPoints = {0.5, 1, 2, 3, 15, 13.3, 17.6, 19.2, 300.2, 10.4};
  
          RealVector v = new ArrayRealVector(1);
          for (double x : testPoints) {
              v.setEntry(0, x);
              assertEquals(uniT.density(x), multiT.density(v), 1e-5);
          }
      }
test_case.class_method_signature: MultivariateTDistributionTest.testReductionToStudentT()
test_case.full_signature: @Test public void testReductionToStudentT()
test_case.identifier: testReductionToStudentT
test_case.invocations: setEntry scalarMultiply createRealIdentityMatrix setEntry assertEquals density density
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void testReductionToStudentT()
focal_class.declarator: log = LoggerFactory.getLogger(MultivariateTDistribution.class)
focal_class.modifier: private static final
focal_class.original_string: private static final Logger log = LoggerFactory.getLogger(MultivariateTDistribution.class);
focal_class.type: Logger
focal_class.var_name: log
focal_class.declarator: mean
focal_class.modifier: private
focal_class.original_string: private RealVector mean;
focal_class.type: RealVector
focal_class.var_name: mean
focal_class.declarator: precisionMatrix
focal_class.modifier: private
focal_class.original_string: private RealMatrix precisionMatrix;
focal_class.type: RealMatrix
focal_class.var_name: precisionMatrix
focal_class.declarator: dof
focal_class.modifier: private
focal_class.original_string: private double dof;
focal_class.type: double
focal_class.var_name: dof
focal_class.declarator: D
focal_class.modifier: private
focal_class.original_string: private int D;
focal_class.type: int
focal_class.var_name: D
focal_class.declarator: multiplier
focal_class.modifier: private
focal_class.original_string: private double multiplier;
focal_class.type: double
focal_class.var_name: multiplier
focal_class.file: contrib/src/main/java/macrobase/analysis/stats/distribution/MultivariateTDistribution.java
focal_class.identifier: MultivariateTDistribution
focal_class.interfaces: implements MultivariateDistribution
focal_class.class_method_signature: MultivariateTDistribution.MultivariateTDistribution(RealVector mean, RealMatrix covarianceMatrix, double degreesOfFreedom)
focal_class.full_signature: public  MultivariateTDistribution(RealVector mean, RealMatrix covarianceMatrix, double degreesOfFreedom)
focal_class.identifier: MultivariateTDistribution
focal_class.modifiers: public
focal_class.parameters: (RealVector mean, RealMatrix covarianceMatrix, double degreesOfFreedom)
focal_class.signature:  MultivariateTDistribution(RealVector mean, RealMatrix covarianceMatrix, double degreesOfFreedom)
focal_class.class_method_signature: MultivariateTDistribution.density(RealVector vector)
focal_class.full_signature: public double density(RealVector vector)
focal_class.identifier: density
focal_class.modifiers: public
focal_class.parameters: (RealVector vector)
focal_class.return: double
focal_class.signature: double density(RealVector vector)
focal_method.body: public double density(RealVector vector) {
          if (dof == 0) {
              return 0;
          }
          RealVector _diff = vector.subtract(mean);
          double prob = 1. / dof * _diff.dotProduct(precisionMatrix.operate(_diff));
          return multiplier * Math.pow(1 + prob, -(dof + D) / 2);
      }
focal_method.class_method_signature: MultivariateTDistribution.density(RealVector vector)
focal_method.full_signature: public double density(RealVector vector)
focal_method.identifier: density
focal_method.invocations: subtract dotProduct operate pow
focal_method.modifiers: public
focal_method.parameters: (RealVector vector)
focal_method.return: double
focal_method.signature: double density(RealVector vector)