GaussianNaiveBayesTrainer extends SingleLabelDatasetTrainer<GaussianNaiveBayesModel> { public GaussianNaiveBayesTrainer withEquiprobableClasses() { resetSettings(); equiprobableClasses = true; return this; }  @Override GaussianNaiveBayesModel fitWithInitializedDeployingContext(DatasetBuilder<K, V> datasetBuilder,
                                                        Preprocessor<K, V> extractor); @Override boolean isUpdateable(GaussianNaiveBayesModel mdl); @Override GaussianNaiveBayesTrainer withEnvironmentBuilder(LearningEnvironmentBuilder envBuilder); GaussianNaiveBayesTrainer withEquiprobableClasses(); GaussianNaiveBayesTrainer setPriorProbabilities(double[] priorProbabilities); GaussianNaiveBayesTrainer resetSettings();  }
@Test public void testReturnsEquivalentProbalitiesWhenSetEquiprobableClasses_() { GaussianNaiveBayesTrainer trainer = new GaussianNaiveBayesTrainer() .withEquiprobableClasses(); GaussianNaiveBayesModel model = trainer.fit( new LocalDatasetBuilder<>(data, parts), new DoubleArrayVectorizer<Integer>().labeled(Vectorizer.LabelCoordinate.LAST) ); Assert.assertEquals(.5, model.getClassProbabilities()[0], PRECISION); Assert.assertEquals(.5, model.getClassProbabilities()[1], PRECISION); }