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-10331] [MLLIB] Update example code in ml-guide #8518
Conversation
Test build #41782 has finished for PR 8518 at commit
|
(0.0, Vectors.dense(2.0, 1.0, -1.0)), | ||
(0.0, Vectors.dense(2.0, 1.3, 1.0)), | ||
(1.0, Vectors.dense(0.0, 1.2, -0.5)) | ||
)).toDF("label", "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.
+1 to switching from reflections-based schema inference into explicitly naming columns; should we consider deprecating LabeledPoint
since a big use case is schema inference?
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.
LabeledPoint
is used by many spark.mllib
APIs.
Made first pass |
* The example code was added in 1.2, before `createDataFrame`. This PR switches to `createDataFrame`. Java code still uses JavaBean. * assume `sqlContext` is available * fix some minor issues from previous code review jkbradley srowen feynmanliang Author: Xiangrui Meng <meng@databricks.com> Closes #8518 from mengxr/SPARK-10331. (cherry picked from commit ca69fc8) Signed-off-by: Xiangrui Meng <meng@databricks.com>
Test build #41798 has finished for PR 8518 at commit
|
Test build #41799 has finished for PR 8518 at commit
|
Test build #41800 has finished for PR 8518 at commit
|
createDataFrame
. This PR switches tocreateDataFrame
. Java code still uses JavaBean.sqlContext
is available@jkbradley @srowen @feynmanliang