[GitHub] spark pull request: [SPARK-15492][ML][DOC]:Binarization scala exam...

2016-05-26 Thread asfgit
Github user asfgit closed the pull request at:

https://github.com/apache/spark/pull/13266


---
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 infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

-
To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org
For additional commands, e-mail: reviews-h...@spark.apache.org



[GitHub] spark pull request: [SPARK-15492][ML][DOC]:Binarization scala exam...

2016-05-26 Thread MLnick
Github user MLnick commented on the pull request:

https://github.com/apache/spark/pull/13266#issuecomment-221836656
  
LGTM, merged to master/branch-2.0. Thanks!


---
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 infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

-
To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org
For additional commands, e-mail: reviews-h...@spark.apache.org



[GitHub] spark pull request: [SPARK-15492][ML][DOC]:Binarization scala exam...

2016-05-25 Thread AmplabJenkins
Github user AmplabJenkins commented on the pull request:

https://github.com/apache/spark/pull/13266#issuecomment-221684412
  
Merged build finished. Test PASSed.


---
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 infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

-
To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org
For additional commands, e-mail: reviews-h...@spark.apache.org



[GitHub] spark pull request: [SPARK-15492][ML][DOC]:Binarization scala exam...

2016-05-25 Thread SparkQA
Github user SparkQA commented on the pull request:

https://github.com/apache/spark/pull/13266#issuecomment-221682051
  
**[Test build #59289 has 
started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/59289/consoleFull)**
 for PR 13266 at commit 
[`09baceb`](https://github.com/apache/spark/commit/09baceb4f00c8b634f5bacea8d0bb37aaa92129e).


---
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 infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

-
To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org
For additional commands, e-mail: reviews-h...@spark.apache.org



[GitHub] spark pull request: [SPARK-15492][ML][DOC]:Binarization scala exam...

2016-05-25 Thread SparkQA
Github user SparkQA commented on the pull request:

https://github.com/apache/spark/pull/13266#issuecomment-221684272
  
**[Test build #59289 has 
finished](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/59289/consoleFull)**
 for PR 13266 at commit 
[`09baceb`](https://github.com/apache/spark/commit/09baceb4f00c8b634f5bacea8d0bb37aaa92129e).
 * This patch passes all tests.
 * This patch merges cleanly.
 * This patch adds no public classes.


---
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 infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

-
To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org
For additional commands, e-mail: reviews-h...@spark.apache.org



[GitHub] spark pull request: [SPARK-15492][ML][DOC]:Binarization scala exam...

2016-05-25 Thread AmplabJenkins
Github user AmplabJenkins commented on the pull request:

https://github.com/apache/spark/pull/13266#issuecomment-221684417
  
Test PASSed.
Refer to this link for build results (access rights to CI server needed): 
https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/59289/
Test PASSed.


---
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 infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

-
To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org
For additional commands, e-mail: reviews-h...@spark.apache.org



[GitHub] spark pull request: [SPARK-15492][ML][DOC]:Binarization scala exam...

2016-05-25 Thread wangmiao1981
Github user wangmiao1981 commented on the pull request:

https://github.com/apache/spark/pull/13266#issuecomment-221681098
  
@MLnick Done. Thanks!


---
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 infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

-
To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org
For additional commands, e-mail: reviews-h...@spark.apache.org



[GitHub] spark pull request: [SPARK-15492][ML][DOC]:Binarization scala exam...

2016-05-25 Thread wangmiao1981
Github user wangmiao1981 commented on the pull request:

https://github.com/apache/spark/pull/13266#issuecomment-221670964
  
@MLnick Sure. I will do it soon. Now, I am debugging a R bug. Thanks! 


---
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 infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

-
To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org
For additional commands, e-mail: reviews-h...@spark.apache.org



[GitHub] spark pull request: [SPARK-15492][ML][DOC]:Binarization scala exam...

2016-05-25 Thread MLnick
Github user MLnick commented on the pull request:

https://github.com/apache/spark/pull/13266#issuecomment-221668080
  
@wangmiao1981 could you do the same for the `OneVsRestExample`? ie remove 
`DataFrame` type annotation and import. You can do that in this PR.


---
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 infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

-
To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org
For additional commands, e-mail: reviews-h...@spark.apache.org



[GitHub] spark pull request: [SPARK-15492][ML][DOC]:Binarization scala exam...

2016-05-24 Thread AmplabJenkins
Github user AmplabJenkins commented on the pull request:

https://github.com/apache/spark/pull/13266#issuecomment-221352671
  
Test PASSed.
Refer to this link for build results (access rights to CI server needed): 
https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/59212/
Test PASSed.


---
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 infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

-
To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org
For additional commands, e-mail: reviews-h...@spark.apache.org



[GitHub] spark pull request: [SPARK-15492][ML][DOC]:Binarization scala exam...

2016-05-24 Thread AmplabJenkins
Github user AmplabJenkins commented on the pull request:

https://github.com/apache/spark/pull/13266#issuecomment-221352665
  
Merged build finished. Test PASSed.


---
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 infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

-
To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org
For additional commands, e-mail: reviews-h...@spark.apache.org



[GitHub] spark pull request: [SPARK-15492][ML][DOC]:Binarization scala exam...

2016-05-24 Thread SparkQA
Github user SparkQA commented on the pull request:

https://github.com/apache/spark/pull/13266#issuecomment-221352536
  
**[Test build #59212 has 
finished](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/59212/consoleFull)**
 for PR 13266 at commit 
[`2dea872`](https://github.com/apache/spark/commit/2dea87249149e3d07dc9cfb7e7d3ff11d0084cea).
 * This patch passes all tests.
 * This patch merges cleanly.
 * This patch adds no public classes.


---
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 infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

-
To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org
For additional commands, e-mail: reviews-h...@spark.apache.org



[GitHub] spark pull request: [SPARK-15492][ML][DOC]:Binarization scala exam...

2016-05-24 Thread SparkQA
Github user SparkQA commented on the pull request:

https://github.com/apache/spark/pull/13266#issuecomment-221350054
  
**[Test build #59212 has 
started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/59212/consoleFull)**
 for PR 13266 at commit 
[`2dea872`](https://github.com/apache/spark/commit/2dea87249149e3d07dc9cfb7e7d3ff11d0084cea).


---
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 infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

-
To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org
For additional commands, e-mail: reviews-h...@spark.apache.org



[GitHub] spark pull request: [SPARK-15492][ML][DOC]:Binarization scala exam...

2016-05-24 Thread wangmiao1981
Github user wangmiao1981 commented on the pull request:

https://github.com/apache/spark/pull/13266#issuecomment-221345524
  
@jerryshao We are going through the examples one by one now. In last a few 
weeks, we have many of these fixed. The intention is making the examples as 
consistent and easy as possible for users who are new to ML. Thanks! 


---
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 infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

-
To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org
For additional commands, e-mail: reviews-h...@spark.apache.org



[GitHub] spark pull request: [SPARK-15492][ML][DOC]:Binarization scala exam...

2016-05-24 Thread MLnick
Github user MLnick commented on the pull request:

https://github.com/apache/spark/pull/13266#issuecomment-221270507
  
I disagree that it's "too trivial to fix" for this specific case, because 
(i) it actually makes the example code included in the ML User Guide 
inconsistent with **all** other example code in the guide, and (ii) it doesn't 
work if you try to copy-paste it into the spark-shell (these guide examples 
should really work for that case). Also, no other User Guide example code (for 
Scala) explicitly imports `DataFrame` - as you can see that import is not part 
of the `include_example` section that goes into the User Guide (nor should it 
be).

But it's a fair point to fix any other examples - `OneVsRestExample` is the 
only other one I found that should be fixed up. There are others (such as the 
"application" examples for random forest, linear regression etc), but they are 
not in the user guide so it doesn't matter much for those.


---
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 infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

-
To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org
For additional commands, e-mail: reviews-h...@spark.apache.org



[GitHub] spark pull request: [SPARK-15492][ML][DOC]:Binarization scala exam...

2016-05-24 Thread jerryshao
Github user jerryshao commented on the pull request:

https://github.com/apache/spark/pull/13266#issuecomment-221259849
  
Since you already did this copy, why not copy this line `import 
org.apache.spark.sql.{DataFrame, SparkSession}`? IMHO, I think it is too 
trivial to fix. Also if you want to fix it, I guess other examples also might 
have such explicit type declaration, why not do a whole fix?


---
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 infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

-
To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org
For additional commands, e-mail: reviews-h...@spark.apache.org



[GitHub] spark pull request: [SPARK-15492][ML][DOC]:Binarization scala exam...

2016-05-24 Thread MLnick
Github user MLnick commented on the pull request:

https://github.com/apache/spark/pull/13266#issuecomment-221187975
  
I agree in normal cases we could leave it as it's not a "bug" per se. In 
this case however, as the examples are intended to be runnable as copy-pastes 
into spark-shell, we should fix this.


---
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 infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

-
To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org
For additional commands, e-mail: reviews-h...@spark.apache.org



[GitHub] spark pull request: [SPARK-15492][ML][DOC]:Binarization scala exam...

2016-05-24 Thread MLnick
Github user MLnick commented on a diff in the pull request:

https://github.com/apache/spark/pull/13266#discussion_r64340139
  
--- Diff: 
examples/src/main/scala/org/apache/spark/examples/ml/BinarizerExample.scala ---
@@ -31,7 +31,7 @@ object BinarizerExample {
   .getOrCreate()
 // $example on$
 val data = Array((0, 0.1), (1, 0.8), (2, 0.2))
-val dataFrame: DataFrame = spark.createDataFrame(data).toDF("label", 
"feature")
+val dataFrame = spark.createDataFrame(data).toDF("label", "feature")
--- End diff --

Since you're removing the type annotation, you can remove the import of 
`DataFrame` also.


---
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 infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

-
To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org
For additional commands, e-mail: reviews-h...@spark.apache.org



[GitHub] spark pull request: [SPARK-15492][ML][DOC]:Binarization scala exam...

2016-05-23 Thread wangmiao1981
Github user wangmiao1981 commented on the pull request:

https://github.com/apache/spark/pull/13266#issuecomment-221168009
  
@jerryshao We have several similar bugs fixed. I am doing QA for ML 2.0 
document now.


---
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 infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

-
To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org
For additional commands, e-mail: reviews-h...@spark.apache.org



[GitHub] spark pull request: [SPARK-15492][ML][DOC]:Binarization scala exam...

2016-05-23 Thread jerryshao
Github user jerryshao commented on the pull request:

https://github.com/apache/spark/pull/13266#issuecomment-221154991
  
I'm wondering is it a bug need to be fixed?


---
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 infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

-
To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org
For additional commands, e-mail: reviews-h...@spark.apache.org



[GitHub] spark pull request: [SPARK-15492][ML][DOC]:Binarization scala exam...

2016-05-23 Thread SparkQA
Github user SparkQA commented on the pull request:

https://github.com/apache/spark/pull/13266#issuecomment-221110424
  
**[Test build #59155 has 
finished](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/59155/consoleFull)**
 for PR 13266 at commit 
[`df29feb`](https://github.com/apache/spark/commit/df29feb9644e3617eff3f561998f26e0977f23ed).
 * This patch passes all tests.
 * This patch merges cleanly.
 * This patch adds no public classes.


---
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 infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

-
To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org
For additional commands, e-mail: reviews-h...@spark.apache.org



[GitHub] spark pull request: [SPARK-15492][ML][DOC]:Binarization scala exam...

2016-05-23 Thread AmplabJenkins
Github user AmplabJenkins commented on the pull request:

https://github.com/apache/spark/pull/13266#issuecomment-221110530
  
Merged build finished. Test PASSed.


---
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 infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

-
To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org
For additional commands, e-mail: reviews-h...@spark.apache.org



[GitHub] spark pull request: [SPARK-15492][ML][DOC]:Binarization scala exam...

2016-05-23 Thread AmplabJenkins
Github user AmplabJenkins commented on the pull request:

https://github.com/apache/spark/pull/13266#issuecomment-221110532
  
Test PASSed.
Refer to this link for build results (access rights to CI server needed): 
https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/59155/
Test PASSed.


---
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 infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

-
To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org
For additional commands, e-mail: reviews-h...@spark.apache.org



[GitHub] spark pull request: [SPARK-15492][ML][DOC]:Binarization scala exam...

2016-05-23 Thread SparkQA
Github user SparkQA commented on the pull request:

https://github.com/apache/spark/pull/13266#issuecomment-221108555
  
**[Test build #59155 has 
started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/59155/consoleFull)**
 for PR 13266 at commit 
[`df29feb`](https://github.com/apache/spark/commit/df29feb9644e3617eff3f561998f26e0977f23ed).


---
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 infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

-
To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org
For additional commands, e-mail: reviews-h...@spark.apache.org



[GitHub] spark pull request: [SPARK-15492][ML][DOC]:Binarization scala exam...

2016-05-23 Thread wangmiao1981
GitHub user wangmiao1981 opened a pull request:

https://github.com/apache/spark/pull/13266

[SPARK-15492][ML][DOC]:Binarization scala example copy & paste to 
spark-shell error

## What changes were proposed in this pull request?

(Please fill in changes proposed in this fix)
The Binarization scala example val dataFrame : Dataframe = 
spark.createDataFrame(data).toDF("label", "feature"), which can't be pasted in 
the spark-shell as Dataframe is not imported. Compared with other examples, 
this explicit type is not required.

So I removed Dataframe in the code.
## How was this patch tested?

(Please explain how this patch was tested. E.g. unit tests, integration 
tests, manual tests)
Manually tested 





You can merge this pull request into a Git repository by running:

$ git pull https://github.com/wangmiao1981/spark unit

Alternatively you can review and apply these changes as the patch at:

https://github.com/apache/spark/pull/13266.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

This closes #13266


commit df29feb9644e3617eff3f561998f26e0977f23ed
Author: wm...@hotmail.com 
Date:   2016-05-23T21:48:15Z

remove type Dataframe




---
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 infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

-
To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org
For additional commands, e-mail: reviews-h...@spark.apache.org