Skip to content

Conversation

@uzmijnlm
Copy link

What changes were proposed in this pull request?

An RDD is created using LabeledPoint, but the comment is like #LabeledPoint(feature, label).
Although in the method ChiSquareTest.test, the second parameter is feature and the third parameter is label, it it better to write label in front of feature here because if an RDD is created using LabeldPoint, what we get are actually (label, feature) pairs.
Now it is changed as LabeledPoint(label, feature).

The comments in Scala and Java example have the same typos.

How was this patch tested?

tested

https://issues.apache.org/jira/browse/SPARK-24688

Author: Weizhe Huang [email protected]

Please review http://spark.apache.org/contributing.html before opening a pull request.

@uzmijnlm
Copy link
Author

ok to test

1 similar comment
@uzmijnlm
Copy link
Author

ok to test

Copy link
Member

@srowen srowen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm OK with this. Conceptually the fields in this class don't have an ordering, but, given they do in the constructor, it's more sensible to consistently describe it as a (label, feature) pair. There are more instances of "(feature, label)" in the project; can you change all of them?

@srowen
Copy link
Member

srowen commented Aug 20, 2018

Ping @uzmijnlm

@srowen
Copy link
Member

srowen commented Aug 24, 2018

@uzmijnlm I can take this over and add additional changes, if you're busy. Is that OK?

@HyukjinKwon
Copy link
Member

@srowen, +1 for taking over. Seems it's been inactive almost for a month.

@SparkQA
Copy link

SparkQA commented Aug 25, 2018

Test build #4287 has finished for PR 21665 at commit 79e414f.

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

@srowen
Copy link
Member

srowen commented Aug 25, 2018

Actually, the other cases aren't referring to a LabeledPoint, so I'll leave them. This is fine, and I'll merge it.

@asfgit asfgit closed this in 6c66ab8 Aug 25, 2018
bogdanrdc pushed a commit to bogdanrdc/spark that referenced this pull request Aug 28, 2018
## What changes were proposed in this pull request?

An RDD is created using LabeledPoint, but the comment is like #LabeledPoint(feature, label).
Although in the method ChiSquareTest.test, the second parameter is feature and the third parameter is label, it it better to write label in front of feature here because if an RDD is created using LabeldPoint, what we get are actually (label, feature) pairs.
Now it is changed as LabeledPoint(label, feature).

The comments in Scala and Java example have the same typos.

## How was this patch tested?

tested

https://issues.apache.org/jira/browse/SPARK-24688

Author: Weizhe Huang 492816239qq.com

Please review http://spark.apache.org/contributing.html before opening a pull request.

Closes apache#21665 from uzmijnlm/my_change.

Authored-by: Huangweizhe <[email protected]>
Signed-off-by: Sean Owen <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants