You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@spark.apache.org by "Erik Erlandson (JIRA)" <ji...@apache.org> on 2015/02/18 00:12:12 UTC

[jira] [Created] (SPARK-5876) generalize the type of categoricalFeaturesInfo to PartialFunction[Int, Int]

Erik Erlandson created SPARK-5876:
-------------------------------------

             Summary: generalize the type of categoricalFeaturesInfo to PartialFunction[Int, Int]
                 Key: SPARK-5876
                 URL: https://issues.apache.org/jira/browse/SPARK-5876
             Project: Spark
          Issue Type: Improvement
          Components: MLlib
            Reporter: Erik Erlandson
            Priority: Minor


The decision tree training takes a parameter {{categoricalFeaturesInfo}} of type {{Map\[Int,Int\]}} that encodes information about any features that are categories and how many categorical values are present.

It would be useful to generalize this type to its superclass {{PartialFunction\[Int,Int\]}}, which would be backward compatible with {{Map\[Int,Int\]}}, but can also accept a {{Seq\[Int\]}}, or any other partial function.

Would need to verify that any tests for key definition in the mapping are using {{isDefinedAt(key)}} instead of {{contains(key)}}




--
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