https://github.com/apache/spark
Revision 35725f735019132377d81b7cf13a6a4fb92aecfe authored by WeichenXu on 25 October 2017, 21:31:36 UTC, committed by Joseph K. Bradley on 25 October 2017, 21:31:49 UTC
## What changes were proposed in this pull request?

Fix NaiveBayes unit test occasionly fail:
Set seed for `BrzMultinomial.sample`, make `generateNaiveBayesInput` output deterministic dataset.
(If we do not set seed, the generated dataset will be random, and the model will be possible to exceed the tolerance in the test, which trigger this failure)

## How was this patch tested?

Manually run tests multiple times and check each time output models contains the same values.

Author: WeichenXu <weichen.xu@databricks.com>

Closes #19558 from WeichenXu123/fix_nb_test_seed.

(cherry picked from commit 841f1d776f420424c20d99cf7110d06c73f9ca20)
Signed-off-by: Joseph K. Bradley <joseph@databricks.com>
1 parent 9ed6404
History
Tip revision: 35725f735019132377d81b7cf13a6a4fb92aecfe authored by WeichenXu on 25 October 2017, 21:31:36 UTC
[SPARK-22332][ML][TEST] Fix NaiveBayes unit test occasionly fail (cause by test dataset not deterministic)
Tip revision: 35725f7

README.md

back to top