We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 0a9b3e3 commit ecab508Copy full SHA for ecab508
core/src/main/scala/org/apache/spark/util/random/SamplingUtils.scala
@@ -36,7 +36,8 @@ private[spark] object SamplingUtils {
36
* @param withReplacement whether sampling with replacement
37
* @return a sampling rate that guarantees sufficient sample size with 99.99% success rate
38
*/
39
- def computeFractionForSampleSize(sampleSizeLowerBound: Int, total: Long, withReplacement: Boolean): Double = {
+ def computeFractionForSampleSize(sampleSizeLowerBound: Int, total: Long,
40
+ withReplacement: Boolean): Double = {
41
val fraction = sampleSizeLowerBound.toDouble / total
42
if (withReplacement) {
43
val numStDev = if (sampleSizeLowerBound < 12) 9 else 5
0 commit comments