Github user HyukjinKwon commented on a diff in the pull request:
https://github.com/apache/spark/pull/16013#discussion_r89676519
--- Diff:
core/src/main/scala/org/apache/spark/util/random/StratifiedSamplingUtils.scala
---
@@ -160,12 +161,20 @@ private[spark] object StratifiedSamplingUtils extends
Logging {
*
* To do so, we compute sampleSize = math.ceil(size * samplingRate) for
each stratum and compare
* it to the number of items that were accepted instantly and the number
of items in the waitlist
- * for that stratum. Most of the time, numAccepted <= sampleSize <=
(numAccepted + numWaitlisted),
- * which means we need to sort the elements in the waitlist by their
associated values in order
- * to find the value T s.t. |{elements in the stratum whose associated
values <= T}| = sampleSize.
- * Note that all elements in the waitlist have values >= bound for
instant accept, so a T value
- * in the waitlist range would allow all elements that were instantly
accepted on the first pass
- * to be included in the sample.
+ * for that stratum.
+ *
+ * Most of the time,
+ * {{{
+ * numAccepted <= sampleSize <= (numAccepted + numWaitlisted)
+ * }}}
+ * , which means we need to sort the elements in the waitlist by their
associated values in order
+ * to find the value T s.t.
+ * {{{
+ * |{elements in the stratum whose associated values <= T}| = sampleSize
+ * }}}.
--- End diff --
- Java
<img width="791" alt="2016-11-27 3 30 15"
src="https://cloud.githubusercontent.com/assets/6477701/20642426/daecbf3a-b451-11e6-8a88-fa9b312fa839.png">
Scaladoc not found
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]