AFAIK, you can not traverse the tree from the rootNode of
DecisionTreeClassificationModel, because type Node does not have
information of its children. Type InternalNode has children information but
it's private that users can not access.
I think the best way to get the probability of each prediction is to select
the rawPredictionCol and ProbabilityCol of the transformed DataFrame, it
will produce the raw prediction and probability prediction.

2015-10-22 12:43 GMT+08:00 sethah <shen...@us.ibm.com>:

> I believe this question will give you the answer your looking for:
> Decision
> Tree Accuracy
> <
> http://apache-spark-user-list.1001560.n3.nabble.com/Spark-MLlib-Decision-Tree-Node-Accuracy-td24561.html#a24629
> >
>
> Basically, you can traverse the tree from the root node.
>
>
>
> --
> View this message in context:
> http://apache-spark-user-list.1001560.n3.nabble.com/Getting-info-from-DecisionTreeClassificationModel-tp25152p25159.html
> Sent from the Apache Spark User List mailing list archive at Nabble.com.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscr...@spark.apache.org
> For additional commands, e-mail: user-h...@spark.apache.org
>
>

Reply via email to