Skip to content

Commit

Permalink
Correcting Scala Style
Browse files Browse the repository at this point in the history
  • Loading branch information
eliasah committed Mar 3, 2016
1 parent 0f319ed commit 38fbf43
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ object QuantileDiscretizer extends DefaultParamsReadable[QuantileDiscretizer] wi
require(totalSamples > 0,
"QuantileDiscretizer requires non-empty input dataset but was given an empty input.")
val requiredSamples = math.max(numBins * numBins, minSamplesRequired)
val fraction = math.min(requiredSamples.toDouble / totalSamples , 1.0)
val fraction = math.min(requiredSamples.toDouble / totalSamples, 1.0)
dataset.sample(withReplacement = false, fraction, new XORShiftRandom(seed).nextInt()).collect()
}

Expand Down

0 comments on commit 38fbf43

Please sign in to comment.