[
https://issues.apache.org/jira/browse/SPARK-20631?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16000023#comment-16000023
]
Apache Spark commented on SPARK-20631:
--------------------------------------
User 'zero323' has created a pull request for this issue:
https://github.com/apache/spark/pull/17891
> LogisticRegression._checkThresholdConsistency should use values not Params
> --------------------------------------------------------------------------
>
> Key: SPARK-20631
> URL: https://issues.apache.org/jira/browse/SPARK-20631
> Project: Spark
> Issue Type: Bug
> Components: ML, PySpark
> Affects Versions: 2.2.0
> Reporter: Maciej Szymkiewicz
> Priority: Minor
>
> {{_checkThresholdConsistency}} incorrectly uses {{getParam}} in attempt to
> access {{threshold}} and {{thresholds}} values. Furthermore it calls it with
> {{Param}} instead of {{str}}:
> {code}
> >>> from pyspark.ml.classification import LogisticRegression
> >>> lr = LogisticRegression(threshold=0.25, thresholds=[0.75, 0.25])
> Traceback (most recent call last):
> ...
> TypeError: getattr(): attribute name must be string
> {code}
> Finally exception message uses {{join}} without converting values to {{str}}.
--
This message was sent by Atlassian JIRA
(v6.3.15#6346)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]