Skip to content
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

Closed
wants to merge 3 commits into from

Conversation

mengxr
Copy link
Contributor

@mengxr mengxr commented Aug 29, 2015

  • 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

@mengxr mengxr changed the title [SPARK-10331] Update example code in ml-guide [SPARK-10331] [MLLIB] Update example code in ml-guide Aug 29, 2015
@SparkQA
Copy link

SparkQA commented Aug 29, 2015

Test build #41782 has finished for PR 8518 at commit 88069e4.

  • This patch passes all tests.
  • This patch merges cleanly.
  • This patch adds no public classes.

(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")
Copy link
Contributor

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?

Copy link
Contributor Author

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.

@feynmanliang
Copy link
Contributor

Made first pass

asfgit pushed a commit that referenced this pull request Aug 30, 2015
* 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>
@asfgit asfgit closed this in ca69fc8 Aug 30, 2015
@SparkQA
Copy link

SparkQA commented Aug 30, 2015

Test build #41798 has finished for PR 8518 at commit f9935f7.

  • This patch fails Spark unit tests.
  • This patch merges cleanly.
  • This patch adds no public classes.

@SparkQA
Copy link

SparkQA commented Aug 30, 2015

Test build #41799 has finished for PR 8518 at commit 1e1eae1.

  • This patch fails Spark unit tests.
  • This patch merges cleanly.
  • This patch adds no public classes.

@SparkQA
Copy link

SparkQA commented Aug 30, 2015

Test build #41800 has finished for PR 8518 at commit f0db289.

  • This patch passes all tests.
  • This patch merges cleanly.
  • This patch adds the following public classes (experimental):
    • public class JavaTrainValidationSplitExample

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants