Github user yinxusen commented on a diff in the pull request:
https://github.com/apache/spark/pull/11108#discussion_r55273882
--- Diff: docs/mllib-statistics.md ---
@@ -584,24 +299,24 @@ distribution `N(0, 1)`, and then map it to `N(1, 4)`.
Refer to the [`RandomRDDs` Java
docs](api/java/org/apache/spark/mllib/random/RandomRDDs) for details on the API.
-{% highlight java %}
-import org.apache.spark.SparkContext;
-import org.apache.spark.api.JavaDoubleRDD;
-import static org.apache.spark.mllib.random.RandomRDDs.*;
-
-JavaSparkContext jsc = ...
-
-// 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.
-JavaDoubleRDD u = normalJavaRDD(jsc, 1000000L, 10);
-// Apply a transform to get a random double RDD following `N(1, 4)`.
-JavaDoubleRDD v = u.map(
- new Function<Double, Double>() {
- public Double call(Double x) {
- return 1.0 + 2.0 * x;
- }
- });
-{% endhighlight %}
+-{% highlight java %}
+ -import org.apache.spark.SparkContext;
+ -import org.apache.spark.api.JavaDoubleRDD;
+ -import static org.apache.spark.mllib.random.RandomRDDs.*;
+ -
+ -JavaSparkContext jsc = ...
+ -
+ -// 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.
+ -JavaDoubleRDD u = normalJavaRDD(jsc, 1000000L, 10);
+ -// Apply a transform to get a random double RDD following `N(1, 4)`.
+ -JavaDoubleRDD v = u.map(
+ - new Function<Double, Double>() {
+ - public Double call(Double x) {
+ - return 1.0 + 2.0 * x;
+ - }
+ - });
+ -{% endhighlight %}
--- End diff --
No I mean you need to remove those minus signs in the front of each line.
On Monday, March 7, 2016, Xin Ren <[email protected]> wrote:
> In docs/mllib-statistics.md
> <https://github.com/apache/spark/pull/11108#discussion_r55272379>:
>
> > + -import org.apache.spark.api.JavaDoubleRDD;
> > + -import static org.apache.spark.mllib.random.RandomRDDs.*;
> > + -
> > + -JavaSparkContext jsc = ...
> > + -
> > + -// 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.
> > + -JavaDoubleRDD u = normalJavaRDD(jsc, 1000000L, 10);
> > + -// Apply a transform to get a random double RDD following `N(1, 4)`.
> > + -JavaDoubleRDD v = u.map(
> > + - new Function<Double, Double>() {
> > + - public Double call(Double x) {
> > + - return 1.0 + 2.0 * x;
> > + - }
> > + - });
> > + -{% endhighlight %}
>
> you mean putting a comment here, explaining why didn't create a separate
> example file?
>
> â
> Reply to this email directly or view it on GitHub
> <https://github.com/apache/spark/pull/11108/files#r55272379>.
>
--
Cheers,
Xusen Yin
---
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]