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

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

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

Sean Owen commented on SPARK-8423:
----------------------------------

This is basically adding schema information to the method call. The new ML pipeline API does that properly. I would not bother changing this code as a result. (But see how you like the string rep in the new implementation.)

> 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
>
> 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
(v6.3.4#6332)

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