-
Notifications
You must be signed in to change notification settings - Fork 28.7k
[SPARK-11551][DOC][Example]Replace example code in ml-features.md using include_example #10002
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
…ng include_example
…ng include_example
Can one of the admins verify this patch? |
Hi @somideshmukh, since it's lots of files in this pull request, I send a pull request to your repo and you can see it here: somideshmukh#1 All of my modifications are there, you can check the code and merge it if it looks good to you. Then we can check the correctness of those newly added files. |
You can see the files changed in that pull request. I make changes in your original code. The main issues there are:
I also add Python files that you missed and 3 Java codes plus with 1 Scala code. |
Besides, there is no need to create a new pull request every time you changing your code. You can modify your previous code and push the changes in current branch. |
review result
for (String ngram : ngrams) System.out.print(ngram + " --- "); | ||
System.out.println(); | ||
} | ||
{% include_example java/org/apache/spark/examples/ml/JavaNGramExample.java %} | ||
{% endhighlight %} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pls remove this line
@somideshmukh This is really a bunch of code. I check some errors as described above for my carelessness and sorry for that. And after fixing those errors, I can get it run in my computer. I'll also check the example codes one by one to make sure every code example is runnable without errors. |
I think the conflict is due to some changes in |
VectorIndexerModel indexerModel = indexer.fit(data); | ||
|
||
Map<Integer, Map<Double, Integer>> categoryMaps = indexerModel.javaCategoryMaps(); | ||
System.out.print("Chose " + categoryMaps.size() + "categorical features:"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
add a white space here " categorical features:"
, otherwise the output is like this Chose 351categorical features: ...
I have made the changes you have mentioned in the given Java and Scala files and push the changes in Branch "SomilBranch1.33". I haven't modified Python files since I haven't work on that files and I donot have python knowledge. |
Pls check it and let me know whether you have got the changes. |
@somideshmukh the changes are here as you can see, but your branch still needs a rebase. |
@somideshmukh I'll help you change the python issues, then I will send another PR to you soon. |
@somideshmukh I have already fix all issues and merged with master. You can accept my pull request here somideshmukh#2. Even though it looks very large, it can be small when you merging it. I believe we can merge the PR after that. |
merge with master
@mengxr LGTM |
@mengxr Shall we merge this PR? I find there are also some PRs modify ml-features.md, so I think it's better to merge it before new conflicts emerging. |
DataFrame dctDf = dct.transform(df); | ||
dctDf.select("featuresDCT").show(3); | ||
{% endhighlight %} | ||
{% include_example java/org/apache/spark/examples/ml/JavaDCTExample.java %}} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
minor: remove extra }
at the end. You can submit a follow-up PR to fix it.
@mengxr Yes, I'll submit a follow-up pr to refine it. |
Merged into master and branch-1.6. Thanks! |
…ing include_example Made new patch contaning only markdown examples moved to exmaple/folder. Ony three java code were not shfted since they were contaning compliation error ,these classes are 1)StandardScale 2)NormalizerExample 3)VectorIndexer Author: Xusen Yin <yinxusen@gmail.com> Author: somideshmukh <somilde@us.ibm.com> Closes #10002 from somideshmukh/SomilBranch1.33. (cherry picked from commit 78209b0) Signed-off-by: Xiangrui Meng <meng@databricks.com>
Looks like this broke the Python style tests:
I guess that Jenkins never tested this PR? |
Reverting this one to bring back Spark builds. |
Sorry for that, I will help fixing them. |
@somideshmukh I give you another PR to fix the Python style issue: somideshmukh#3. After merging it, we can call jenkins testing once here. |
This reverts PR apache#10002, commit 78209b0. The original PR wasn't tested on Jenkins before being merged. Author: Cheng Lian <lian@databricks.com> Closes apache#10200 from liancheng/revert-pr-10002.
Hit some network issue, just reverted this PR from master and branch-1.6 in #10200. |
@somideshmukh Do you still have time work on this? Pleas let me know ASAP thanks. |
@yinxusen Maybe you can fork this PR branch and get it merged. You may add a note in your PR description to remind committers to attribute your PR to @somideshmukh. We can specify primary author while merging a PR using our merge script. |
Sure, I will do it |
Please let me know what needs to be done,I have not worked on python code. |
@somideshmukh Never mind, I add a new one on behalf of you: #10219 @liancheng if it looks good to you, please help me merge it after the Jenkins test. Thanks! |
Made new patch contaning only markdown examples moved to exmaple/folder.
Ony three java code were not shfted since they were contaning compliation error ,these classes are
1)StandardScale 2)NormalizerExample 3)VectorIndexer