test_class.declarator: PRECISION = 1e-2
test_class.modifier: private static final
test_class.original_string: private static final double PRECISION = 1e-2;
test_class.type: double
test_class.var_name: PRECISION
test_class.declarator: LABEL_1 = 1.
test_class.modifier: private static final
test_class.original_string: private static final double LABEL_1 = 1.;
test_class.type: double
test_class.var_name: LABEL_1
test_class.declarator: LABEL_2 = 2.
test_class.modifier: private static final
test_class.original_string: private static final double LABEL_2 = 2.;
test_class.type: double
test_class.var_name: LABEL_2
test_class.declarator: binarizedData = new HashMap<>()
test_class.modifier: private static final
test_class.original_string: private static final Map<Integer, double[]> binarizedData = new HashMap<>();
test_class.type: Map<Integer, double[]>
test_class.var_name: binarizedData
test_class.declarator: data = new HashMap<>()
test_class.modifier: private static final
test_class.original_string: private static final Map<Integer, double[]> data = new HashMap<>();
test_class.type: Map<Integer, double[]>
test_class.var_name: data
test_class.declarator: binarizedDatathresholds = new double[][] {{.5}, {.5}, {.5}, {.5}, {.5}}
test_class.modifier: private static final
test_class.original_string: private static final double[][] binarizedDatathresholds = new double[][] {{.5}, {.5}, {.5}, {.5}, {.5}};
test_class.type: double[][]
test_class.var_name: binarizedDatathresholds
test_class.declarator: thresholds = new double[][] {{4, 8}, {.5}, {.3, .4, .5}, {250, 500, 750}}
test_class.modifier: private static final
test_class.original_string: private static final double[][] thresholds = new double[][] {{4, 8}, {.5}, {.3, .4, .5}, {250, 500, 750}};
test_class.type: double[][]
test_class.var_name: thresholds
test_class.declarator: trainer
test_class.modifier: private
test_class.original_string: private DiscreteNaiveBayesTrainer trainer;
test_class.type: DiscreteNaiveBayesTrainer
test_class.var_name: trainer
test_class.file: modules/ml/src/test/java/org/apache/ignite/ml/naivebayes/discrete/DiscreteNaiveBayesTrainerTest.java
test_class.identifier: DiscreteNaiveBayesTrainerTest
test_class.superclass: extends TrainerTest
test_case.body: @Test
      public void testReturnsCorrectPriorProbabilitiesWithDefferentThresholds() {
          double[][][] expectedPriorProbabilites = new double[][][] {
              {
                  {4. / 8, 2. / 8, 2. / 8},
                  {.5, .5},
                  {1. / 8, 3. / 8, 2. / 8, 2. / 8},
                  {1. / 8, 2. / 8, 2. / 8, 3. / 8}},
              {
                  {2. / 4, 1. / 4, 1. / 4},
                  {1. / 4, 3. / 4},
                  {1. / 4, 0, 2. / 4, 1. / 4},
                  {2. / 4, 1. / 4, 1. / 4, 0}}
          };
  
          DiscreteNaiveBayesModel model = trainer
              .setBucketThresholds(thresholds)
              .fit(
                  new LocalDatasetBuilder<>(data, parts),
                  new DoubleArrayVectorizer<Integer>().labeled(Vectorizer.LabelCoordinate.LAST)
              );
  
          for (int i = 0; i < expectedPriorProbabilites.length; i++) {
              for (int j = 0; j < expectedPriorProbabilites[i].length; j++)
                  Assert.assertArrayEquals(expectedPriorProbabilites[i][j], model.getProbabilities()[i][j], PRECISION);
          }
      }
test_case.class_method_signature: DiscreteNaiveBayesTrainerTest.testReturnsCorrectPriorProbabilitiesWithDefferentThresholds()
test_case.full_signature: @Test public void testReturnsCorrectPriorProbabilitiesWithDefferentThresholds()
test_case.identifier: testReturnsCorrectPriorProbabilitiesWithDefferentThresholds
test_case.invocations: fit setBucketThresholds labeled assertArrayEquals getProbabilities
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void testReturnsCorrectPriorProbabilitiesWithDefferentThresholds()
focal_class.declarator: PRECISION = 1e-10
focal_class.modifier: private static final
focal_class.original_string: private static final double PRECISION = 1e-10;
focal_class.type: double
focal_class.var_name: PRECISION
focal_class.declarator: priorProbabilities
focal_class.modifier: private
focal_class.original_string: private double[] priorProbabilities;
focal_class.type: double[]
focal_class.var_name: priorProbabilities
focal_class.declarator: equiprobableClasses
focal_class.modifier: private
focal_class.original_string: private boolean equiprobableClasses;
focal_class.type: boolean
focal_class.var_name: equiprobableClasses
focal_class.declarator: bucketThresholds
focal_class.modifier: private
focal_class.original_string: private double[][] bucketThresholds;
focal_class.type: double[][]
focal_class.var_name: bucketThresholds
focal_class.file: modules/ml/src/main/java/org/apache/ignite/ml/naivebayes/discrete/DiscreteNaiveBayesTrainer.java
focal_class.identifier: DiscreteNaiveBayesTrainer
focal_class.class_method_signature: DiscreteNaiveBayesTrainer.fitWithInitializedDeployingContext(DatasetBuilder<K, V> datasetBuilder,
                                                          Preprocessor<K, V> extractor)
focal_class.full_signature: @Override public DiscreteNaiveBayesModel fitWithInitializedDeployingContext(DatasetBuilder<K, V> datasetBuilder,
                                                          Preprocessor<K, V> extractor)
focal_class.identifier: fitWithInitializedDeployingContext
focal_class.modifiers: @Override public
focal_class.parameters: (DatasetBuilder<K, V> datasetBuilder,
                                                          Preprocessor<K, V> extractor)
focal_class.return: DiscreteNaiveBayesModel
focal_class.signature: DiscreteNaiveBayesModel fitWithInitializedDeployingContext(DatasetBuilder<K, V> datasetBuilder,
                                                          Preprocessor<K, V> extractor)
focal_class.class_method_signature: DiscreteNaiveBayesTrainer.isUpdateable(DiscreteNaiveBayesModel mdl)
focal_class.full_signature: @Override public boolean isUpdateable(DiscreteNaiveBayesModel mdl)
focal_class.identifier: isUpdateable
focal_class.modifiers: @Override public
focal_class.parameters: (DiscreteNaiveBayesModel mdl)
focal_class.return: boolean
focal_class.signature: boolean isUpdateable(DiscreteNaiveBayesModel mdl)
focal_class.class_method_signature: DiscreteNaiveBayesTrainer.updateModel(DiscreteNaiveBayesModel mdl,
                                                                     DatasetBuilder<K, V> datasetBuilder, Preprocessor<K, V> extractor)
focal_class.full_signature: @Override protected DiscreteNaiveBayesModel updateModel(DiscreteNaiveBayesModel mdl,
                                                                     DatasetBuilder<K, V> datasetBuilder, Preprocessor<K, V> extractor)
focal_class.identifier: updateModel
focal_class.modifiers: @Override protected
focal_class.parameters: (DiscreteNaiveBayesModel mdl,
                                                                     DatasetBuilder<K, V> datasetBuilder, Preprocessor<K, V> extractor)
focal_class.return: DiscreteNaiveBayesModel
focal_class.signature: DiscreteNaiveBayesModel updateModel(DiscreteNaiveBayesModel mdl,
                                                                     DatasetBuilder<K, V> datasetBuilder, Preprocessor<K, V> extractor)
focal_class.class_method_signature: DiscreteNaiveBayesTrainer.checkSumsHolder(DiscreteNaiveBayesSumsHolder holder1, DiscreteNaiveBayesSumsHolder holder2)
focal_class.full_signature: private boolean checkSumsHolder(DiscreteNaiveBayesSumsHolder holder1, DiscreteNaiveBayesSumsHolder holder2)
focal_class.identifier: checkSumsHolder
focal_class.modifiers: private
focal_class.parameters: (DiscreteNaiveBayesSumsHolder holder1, DiscreteNaiveBayesSumsHolder holder2)
focal_class.return: boolean
focal_class.signature: boolean checkSumsHolder(DiscreteNaiveBayesSumsHolder holder1, DiscreteNaiveBayesSumsHolder holder2)
focal_class.class_method_signature: DiscreteNaiveBayesTrainer.withEquiprobableClasses()
focal_class.full_signature: public DiscreteNaiveBayesTrainer withEquiprobableClasses()
focal_class.identifier: withEquiprobableClasses
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.return: DiscreteNaiveBayesTrainer
focal_class.signature: DiscreteNaiveBayesTrainer withEquiprobableClasses()
focal_class.class_method_signature: DiscreteNaiveBayesTrainer.setPriorProbabilities(double[] priorProbabilities)
focal_class.full_signature: public DiscreteNaiveBayesTrainer setPriorProbabilities(double[] priorProbabilities)
focal_class.identifier: setPriorProbabilities
focal_class.modifiers: public
focal_class.parameters: (double[] priorProbabilities)
focal_class.return: DiscreteNaiveBayesTrainer
focal_class.signature: DiscreteNaiveBayesTrainer setPriorProbabilities(double[] priorProbabilities)
focal_class.class_method_signature: DiscreteNaiveBayesTrainer.setBucketThresholds(double[][] bucketThresholds)
focal_class.full_signature: public DiscreteNaiveBayesTrainer setBucketThresholds(double[][] bucketThresholds)
focal_class.identifier: setBucketThresholds
focal_class.modifiers: public
focal_class.parameters: (double[][] bucketThresholds)
focal_class.return: DiscreteNaiveBayesTrainer
focal_class.signature: DiscreteNaiveBayesTrainer setBucketThresholds(double[][] bucketThresholds)
focal_class.class_method_signature: DiscreteNaiveBayesTrainer.resetProbabilitiesSettings()
focal_class.full_signature: public DiscreteNaiveBayesTrainer resetProbabilitiesSettings()
focal_class.identifier: resetProbabilitiesSettings
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.return: DiscreteNaiveBayesTrainer
focal_class.signature: DiscreteNaiveBayesTrainer resetProbabilitiesSettings()
focal_class.class_method_signature: DiscreteNaiveBayesTrainer.toBucketNumber(double val, double[] thresholds)
focal_class.full_signature: private int toBucketNumber(double val, double[] thresholds)
focal_class.identifier: toBucketNumber
focal_class.modifiers: private
focal_class.parameters: (double val, double[] thresholds)
focal_class.return: int
focal_class.signature: int toBucketNumber(double val, double[] thresholds)
focal_class.superclass: extends SingleLabelDatasetTrainer<DiscreteNaiveBayesModel>
focal_method.body: public DiscreteNaiveBayesTrainer setBucketThresholds(double[][] bucketThresholds) {
          this.bucketThresholds = bucketThresholds;
          return this;
      }
focal_method.class_method_signature: DiscreteNaiveBayesTrainer.setBucketThresholds(double[][] bucketThresholds)
focal_method.full_signature: public DiscreteNaiveBayesTrainer setBucketThresholds(double[][] bucketThresholds)
focal_method.identifier: setBucketThresholds
focal_method.modifiers: public
focal_method.parameters: (double[][] bucketThresholds)
focal_method.return: DiscreteNaiveBayesTrainer
focal_method.signature: DiscreteNaiveBayesTrainer setBucketThresholds(double[][] bucketThresholds)