You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@spark.apache.org by "Ruben Janssen (JIRA)" <ji...@apache.org> on 2016/08/01 20:51:20 UTC

[jira] [Commented] (SPARK-7445) StringIndexer should handle binary labels properly

    [ https://issues.apache.org/jira/browse/SPARK-7445?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15402786#comment-15402786 ] 

Ruben Janssen commented on SPARK-7445:
--------------------------------------

I'd be interested to work on this.

Before I start however, just to clarify:
'Another option is to allow users to provide a list or labels and we use the ordering.' I think you mean 'Another option is to allow users to provide a list OF labels and use THAT GIVEN ordering.'?

If that is the case, I would advocate that because having binary labels does not necessarily imply that we have negatives and positives. We could have "left"/"right" for example. This would also be more flexible for the users and does not have to be limited to just binary labels. 

> StringIndexer should handle binary labels properly
> --------------------------------------------------
>
>                 Key: SPARK-7445
>                 URL: https://issues.apache.org/jira/browse/SPARK-7445
>             Project: Spark
>          Issue Type: Improvement
>          Components: ML
>    Affects Versions: 1.4.0
>            Reporter: Xiangrui Meng
>            Priority: Minor
>
> StringIndexer orders labels by their counts. However, for binary labels, we should really map negatives to 0 and positive to 1. So can put special rules for binary labels:
> 1. "+1"/"-1", "1"/"-1", "1"/"0"
> 2. "yes"/"no"
> 3. "true"/"false"
> Another option is to allow users to provide a list or labels and we use the ordering.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@spark.apache.org
For additional commands, e-mail: issues-help@spark.apache.org