Skip to content

[SPARK-15823][PySpark][ML] Add @property for 'accuracy' in MulticlassMetrics#13560

Closed
zhengruifeng wants to merge 2 commits intoapache:masterfrom
zhengruifeng:add_accuracy_property
Closed

[SPARK-15823][PySpark][ML] Add @property for 'accuracy' in MulticlassMetrics#13560
zhengruifeng wants to merge 2 commits intoapache:masterfrom
zhengruifeng:add_accuracy_property

Conversation

@zhengruifeng
Copy link
Contributor

What changes were proposed in this pull request?

accuracy should be decorated with @property to keep step with other methods in pyspark.MulticlassMetrics, like weightedPrecision, weightedRecall, etc

How was this patch tested?

manual tests

@SparkQA
Copy link

SparkQA commented Jun 8, 2016

Test build #60166 has finished for PR 13560 at commit 1cd6b10.

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

@zhengruifeng zhengruifeng changed the title [SPARK-15823][PySpark][ML] Add @property for 'property' in MulticlassMetrics [SPARK-15823][PySpark][ML] Add @property for 'accuracy' in MulticlassMetrics Jun 9, 2016
>>> metrics.recall()
0.66...
>>> metrics.accuracy()
>>> metrics.accuracy
Copy link
Member

Choose a reason for hiding this comment

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

While we're here, maybe we should remove the deprecated calls to recall() and precision() above.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Ok, I will remove those lines

@SparkQA
Copy link

SparkQA commented Jun 10, 2016

Test build #60280 has finished for PR 13560 at commit d8b83cb.

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

@srowen
Copy link
Member

srowen commented Jun 10, 2016

Merged to master/2.0

asfgit pushed a commit that referenced this pull request Jun 10, 2016
…Metrics

## What changes were proposed in this pull request?
`accuracy` should be decorated with `property` to keep step with other methods in `pyspark.MulticlassMetrics`, like `weightedPrecision`, `weightedRecall`, etc

## How was this patch tested?
manual tests

Author: Zheng RuiFeng <ruifengz@foxmail.com>

Closes #13560 from zhengruifeng/add_accuracy_property.

(cherry picked from commit 16ca32e)
Signed-off-by: Sean Owen <sowen@cloudera.com>
@asfgit asfgit closed this in 16ca32e Jun 10, 2016
@zhengruifeng zhengruifeng deleted the add_accuracy_property branch June 12, 2016 02:40
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.

3 participants