-
Notifications
You must be signed in to change notification settings - Fork 28.5k
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
[SPARK-7578] [ml] [doc] User guide for spark.ml Normalizer, IDF, StandardScaler #6127
Conversation
Merged build triggered. |
Merged build started. |
Test build #32635 has started for PR 6127 at commit |
Test build #32635 has finished for PR 6127 at commit
|
Merged build finished. Test PASSed. |
Test PASSed. |
8a2b5cd
to
45245e8
Compare
Build triggered. |
Build started. |
Test build #33085 has started for PR 6127 at commit |
Test build #33085 has finished for PR 6127 at commit
|
Build finished. Test PASSed. |
Test PASSed. |
45245e8
to
f16bcec
Compare
@mengxr Just rebased off of master, so this should be ready to review (with fewer PRs for the ml-features.md file now). |
Merged build triggered. |
Merged build started. |
Test build #33274 has started for PR 6127 at commit |
Test build #33274 has finished for PR 6127 at commit
|
Merged build finished. Test FAILed. |
Test FAILed. |
Test build #848 has started for PR 6127 at commit |
Test build #848 has finished for PR 6127 at commit
|
val idf = new IDF().setInputCol("rawFeatures").setOutputCol("features") | ||
val idfModel = idf.fit(featurizedData) | ||
val rescaledData = idfModel.transform(featurizedData) | ||
rescaledData.select("features", "label").take(3).foreach(println) |
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: take(3)
-> collect()
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.
I thought about that, but was worried users would copy this into their own code and try to print out a huge dataset. What do you think?
IDF idf = new IDF().setInputCol("rawFeatures").setOutputCol("features"); | ||
IDFModel idfModel = idf.fit(featurizedData); | ||
DataFrame rescaledData = idfModel.transform(featurizedData); | ||
for (Row r : rescaledData.select("features", "label").take(3)) { |
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.
take(3)
-> collect()
?
@mengxr Updated. Thanks! |
Merged build triggered. |
Merged build started. |
Test build #33310 has started for PR 6127 at commit |
Test build #33310 has finished for PR 6127 at commit
|
Merged build finished. Test PASSed. |
Test PASSed. |
…dardScaler Added user guide sections with code examples. Also added small Java unit tests to test Java example in guide. CC: mengxr Author: Joseph K. Bradley <joseph@databricks.com> Closes #6127 from jkbradley/feature-guide-2 and squashes the following commits: cd47f4b [Joseph K. Bradley] Updated based on code review f16bcec [Joseph K. Bradley] Fixed merge issues and update Python examples print calls for Python 3 0a862f9 [Joseph K. Bradley] Added Normalizer, StandardScaler to ml-features doc, plus small Java unit tests a21c2d6 [Joseph K. Bradley] Updated ml-features.md with IDF (cherry picked from commit 2728c3d) Signed-off-by: Xiangrui Meng <meng@databricks.com>
LGTM. Merged into master and branch-1.4. Thanks! |
…dardScaler Added user guide sections with code examples. Also added small Java unit tests to test Java example in guide. CC: mengxr Author: Joseph K. Bradley <joseph@databricks.com> Closes #6127 from jkbradley/feature-guide-2 and squashes the following commits: cd47f4b [Joseph K. Bradley] Updated based on code review f16bcec [Joseph K. Bradley] Fixed merge issues and update Python examples print calls for Python 3 0a862f9 [Joseph K. Bradley] Added Normalizer, StandardScaler to ml-features doc, plus small Java unit tests a21c2d6 [Joseph K. Bradley] Updated ml-features.md with IDF
…dardScaler Added user guide sections with code examples. Also added small Java unit tests to test Java example in guide. CC: mengxr Author: Joseph K. Bradley <joseph@databricks.com> Closes apache#6127 from jkbradley/feature-guide-2 and squashes the following commits: cd47f4b [Joseph K. Bradley] Updated based on code review f16bcec [Joseph K. Bradley] Fixed merge issues and update Python examples print calls for Python 3 0a862f9 [Joseph K. Bradley] Added Normalizer, StandardScaler to ml-features doc, plus small Java unit tests a21c2d6 [Joseph K. Bradley] Updated ml-features.md with IDF
…dardScaler Added user guide sections with code examples. Also added small Java unit tests to test Java example in guide. CC: mengxr Author: Joseph K. Bradley <joseph@databricks.com> Closes apache#6127 from jkbradley/feature-guide-2 and squashes the following commits: cd47f4b [Joseph K. Bradley] Updated based on code review f16bcec [Joseph K. Bradley] Fixed merge issues and update Python examples print calls for Python 3 0a862f9 [Joseph K. Bradley] Added Normalizer, StandardScaler to ml-features doc, plus small Java unit tests a21c2d6 [Joseph K. Bradley] Updated ml-features.md with IDF
…dardScaler Added user guide sections with code examples. Also added small Java unit tests to test Java example in guide. CC: mengxr Author: Joseph K. Bradley <joseph@databricks.com> Closes apache#6127 from jkbradley/feature-guide-2 and squashes the following commits: cd47f4b [Joseph K. Bradley] Updated based on code review f16bcec [Joseph K. Bradley] Fixed merge issues and update Python examples print calls for Python 3 0a862f9 [Joseph K. Bradley] Added Normalizer, StandardScaler to ml-features doc, plus small Java unit tests a21c2d6 [Joseph K. Bradley] Updated ml-features.md with IDF
Added user guide sections with code examples.
Also added small Java unit tests to test Java example in guide.
CC: @mengxr