test_class.declarator: log = LoggerFactory.getLogger(VariationalInferenceTest.class)
test_class.modifier: private static final
test_class.original_string: private static final Logger log = LoggerFactory.getLogger(VariationalInferenceTest.class);
test_class.type: Logger
test_class.var_name: log
test_class.file: contrib/src/test/java/macrobase/analysis/stats/mixture/VariationalInferenceTest.java
test_class.identifier: VariationalInferenceTest
test_case.body: @Test
      public void sviStepTest() {
          assertEquals(0.9, VariationalInference.step(0, 1, 0.9), 1e-9);
          assertEquals(19.0, VariationalInference.step(10, 20, 0.9), 1e-9);
          assertEquals(12.0, VariationalInference.step(10, 20, 0.2), 1e-9);
  
          double[] array1 = {1, 2, 6};
          double[] array2 = {2, 3, 8};
          double[] array3 = {5, 6, 14};
          RealVector start = new ArrayRealVector(array1);
          RealVector end = new ArrayRealVector(array3);
          assertEquals(new ArrayRealVector(array2), VariationalInference.step(start, end, 0.25));
  
          double[][] matrix1 = {{1, 2}, {3, 10}};
          double[][] matrix2 = {{2, 6}, {3, 100}};
          double[][] matrix3 = {{5, 18}, {3, 370}};
          RealMatrix s = new BlockRealMatrix(matrix1);
          RealMatrix e = new BlockRealMatrix(matrix3);
          assertEquals(new BlockRealMatrix(matrix2), VariationalInference.step(s, e, 0.25));
      }
test_case.class_method_signature: VariationalInferenceTest.sviStepTest()
test_case.full_signature: @Test public void sviStepTest()
test_case.identifier: sviStepTest
test_case.invocations: assertEquals step assertEquals step assertEquals step assertEquals step assertEquals step
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void sviStepTest()
focal_class.declarator: log = LoggerFactory.getLogger(VariationalInference.class)
focal_class.modifier: private static final
focal_class.original_string: private static final Logger log = LoggerFactory.getLogger(VariationalInference.class);
focal_class.type: Logger
focal_class.var_name: log
focal_class.file: contrib/src/main/java/macrobase/analysis/stats/mixture/VariationalInference.java
focal_class.identifier: VariationalInference
focal_class.class_method_signature: VariationalInference.normalizeLogProbabilities(double[] lnMixing, double[] lnPrecision, double[][] dataLogLike)
focal_class.full_signature: public static double[][] normalizeLogProbabilities(double[] lnMixing, double[] lnPrecision, double[][] dataLogLike)
focal_class.identifier: normalizeLogProbabilities
focal_class.modifiers: public static
focal_class.parameters: (double[] lnMixing, double[] lnPrecision, double[][] dataLogLike)
focal_class.return: double[][]
focal_class.signature: double[][] normalizeLogProbabilities(double[] lnMixing, double[] lnPrecision, double[][] dataLogLike)
focal_class.class_method_signature: VariationalInference.trainTestStochastic(VarGMM model, List<Datum> trainData, List<Datum> testData, MixingComponents mixingComponents, NormalWishartClusters clusters, int desiredMinibatchSize, double delay, double forgettingRate)
focal_class.full_signature: public static void trainTestStochastic(VarGMM model, List<Datum> trainData, List<Datum> testData, MixingComponents mixingComponents, NormalWishartClusters clusters, int desiredMinibatchSize, double delay, double forgettingRate)
focal_class.identifier: trainTestStochastic
focal_class.modifiers: public static
focal_class.parameters: (VarGMM model, List<Datum> trainData, List<Datum> testData, MixingComponents mixingComponents, NormalWishartClusters clusters, int desiredMinibatchSize, double delay, double forgettingRate)
focal_class.return: void
focal_class.signature: void trainTestStochastic(VarGMM model, List<Datum> trainData, List<Datum> testData, MixingComponents mixingComponents, NormalWishartClusters clusters, int desiredMinibatchSize, double delay, double forgettingRate)
focal_class.class_method_signature: VariationalInference.trainTestMeanField(VarGMM model, List<Datum> trainData, List<Datum> testData, MixingComponents mixingComponents, NormalWishartClusters clusters)
focal_class.full_signature: public static void trainTestMeanField(VarGMM model, List<Datum> trainData, List<Datum> testData, MixingComponents mixingComponents, NormalWishartClusters clusters)
focal_class.identifier: trainTestMeanField
focal_class.modifiers: public static
focal_class.parameters: (VarGMM model, List<Datum> trainData, List<Datum> testData, MixingComponents mixingComponents, NormalWishartClusters clusters)
focal_class.return: void
focal_class.signature: void trainTestMeanField(VarGMM model, List<Datum> trainData, List<Datum> testData, MixingComponents mixingComponents, NormalWishartClusters clusters)
focal_class.class_method_signature: VariationalInference.step(double value, double newValue, double pace)
focal_class.full_signature: public static double step(double value, double newValue, double pace)
focal_class.identifier: step
focal_class.modifiers: public static
focal_class.parameters: (double value, double newValue, double pace)
focal_class.return: double
focal_class.signature: double step(double value, double newValue, double pace)
focal_class.class_method_signature: VariationalInference.step(RealVector start, RealVector end, double pace)
focal_class.full_signature: public static RealVector step(RealVector start, RealVector end, double pace)
focal_class.identifier: step
focal_class.modifiers: public static
focal_class.parameters: (RealVector start, RealVector end, double pace)
focal_class.return: RealVector
focal_class.signature: RealVector step(RealVector start, RealVector end, double pace)
focal_class.class_method_signature: VariationalInference.step(RealMatrix start, RealMatrix end, double pace)
focal_class.full_signature: public static RealMatrix step(RealMatrix start, RealMatrix end, double pace)
focal_class.identifier: step
focal_class.modifiers: public static
focal_class.parameters: (RealMatrix start, RealMatrix end, double pace)
focal_class.return: RealMatrix
focal_class.signature: RealMatrix step(RealMatrix start, RealMatrix end, double pace)
focal_class.class_method_signature: VariationalInference.calculateClusterWeights(double[][] r)
focal_class.full_signature: protected static double[] calculateClusterWeights(double[][] r)
focal_class.identifier: calculateClusterWeights
focal_class.modifiers: protected static
focal_class.parameters: (double[][] r)
focal_class.return: double[]
focal_class.signature: double[] calculateClusterWeights(double[][] r)
focal_method.body: public static double step(double value, double newValue, double pace) {
          return (1 - pace) * value + pace * newValue;
      }
focal_method.class_method_signature: VariationalInference.step(double value, double newValue, double pace)
focal_method.full_signature: public static double step(double value, double newValue, double pace)
focal_method.identifier: step
focal_method.modifiers: public static
focal_method.parameters: (double value, double newValue, double pace)
focal_method.return: double
focal_method.signature: double step(double value, double newValue, double pace)