Github user yinxusen commented on a diff in the pull request:
https://github.com/apache/spark/pull/11108#discussion_r55145679
--- Diff: docs/mllib-statistics.md ---
@@ -562,18 +277,7 @@ distribution `N(0, 1)`, and then map it to `N(1, 4)`.
Refer to the [`RandomRDDs` Scala
docs](api/scala/index.html#org.apache.spark.mllib.random.RandomRDDs) for
details on the API.
-{% highlight scala %}
-import org.apache.spark.SparkContext
-import org.apache.spark.mllib.random.RandomRDDs._
-
-val sc: SparkContext = ...
-
-// Generate a random double RDD that contains 1 million i.i.d. values
drawn from the
-// standard normal distribution `N(0, 1)`, evenly distributed in 10
partitions.
-val u = normalRDD(sc, 1000000L, 10)
-// Apply a transform to get a random double RDD following `N(1, 4)`.
-val v = u.map(x => 1.0 + 2.0 * x)
-{% endhighlight %}
+{% include_example
scala/org/apache/spark/examples/mllib/RandomDataGenerationExample.scala %}
--- End diff --
Let's keep the random data generation examples here without substitution,
since the example is quite simple. Same for `JavaRandomDataGenerationExample`
and `random_data_generation_example`
---
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]