Skip to content
Closed
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Changes - III addressed
  • Loading branch information
chetkhatri committed Jan 1, 2018
commit e891f53dfd609ef9cb46f70147c59f1113c7c0cb
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ public static void main(String[] args) {
.setNumBuckets(3);

Dataset<Row> result = discretizer.fit(df).transform(df);
result.show();
result.show(false);
// $example off$
spark.stop();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ object QuantileDiscretizerExample {
.setNumBuckets(3)

val result = discretizer.fit(df).transform(df)
result.show()
result.show(false)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

One more question - is it necessary to make this not truncate?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We're following same style in other examples so it is good to do.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Which other examples? most do not set this, and the Java equivalent doesn't either. If there's a good reason that the output needs to be untruncated, that's fine, just also change the Java example.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@srowen correct either way it works for ex. examples/ml/LDAExamples.scala

// $example off$

spark.stop()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,10 +41,10 @@ object StratifiedSamplingExample {
val exactSample = data.sampleByKeyExact(withReplacement = false, fractions = fractions)
// $example off$

println(s"approxSample size is ${approxSample.collect().size.toString}")
println(s"approxSample size is ${approxSample.collect().size}")
approxSample.collect().foreach(println)

println(s"exactSample its size is ${exactSample.collect().size.toString}")
println(s"exactSample its size is ${exactSample.collect().size}")
exactSample.collect().foreach(println)

sc.stop()
Expand Down