spark-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Justin Yip (JIRA)" <j...@apache.org>
Subject [jira] [Created] (SPARK-8423) More informative DecisionTreeModel.toDebugString
Date Thu, 18 Jun 2015 02:01:00 GMT
Justin Yip created SPARK-8423:
---------------------------------

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


Mime
View raw message