You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@spark.apache.org by "Justin Yip (JIRA)" <ji...@apache.org> on 2015/06/18 04:01:00 UTC
[jira] [Created] (SPARK-8423) More informative
DecisionTreeModel.toDebugString
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