You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@spark.apache.org by "Hyukjin Kwon (JIRA)" <ji...@apache.org> on 2019/05/21 04:34:30 UTC

[jira] [Resolved] (SPARK-8423) More informative DecisionTreeModel.toDebugString

     [ https://issues.apache.org/jira/browse/SPARK-8423?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Hyukjin Kwon resolved SPARK-8423.
---------------------------------
    Resolution: Incomplete

> More informative DecisionTreeModel.toDebugString
> ------------------------------------------------
>
>                 Key: SPARK-8423
>                 URL: https://issues.apache.org/jira/browse/SPARK-8423
>             Project: Spark
>          Issue Type: Improvement
>          Components: ML
>            Reporter: Justin Yip
>            Priority: Major
>              Labels: bulk-closed
>
> The current DecisionTreeModel.toDebugString returns a string like this:
> {code}
> DecisionTreeRegressionModel of depth 5 with 59 nodes
>   If (feature 1 <= -0.06568792377298172)
>    If (feature 0 <= -0.02949210603796315)
>     If (feature 2 <= -0.08341711651992334)
> ...
> {code}
> Displaying them as "feature <index>" is not super useful for debugging. It would be good if we can pass an optional {{Array[ String ]}} to the method {{toDebugString}}. i.e.
> {code}
> val model = tree.fit(training)
> println(model.toDebugString(Array("width", "height", "weight")))
> {code}
> And we will get:
> {code}
> DecisionTreeRegressionModel of depth 5 with 59 nodes
>   If (height <= -0.06568792377298172)
>    If (width <= -0.02949210603796315)
>     If (weight <= -0.08341711651992334)
> ...
> {code}
> If the debug string is not supplied, index is used instead.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

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