You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@spark.apache.org by "Xiangrui Meng (JIRA)" <ji...@apache.org> on 2014/08/17 06:14:18 UTC
[jira] [Created] (SPARK-3086) Use 1-indexing for decision tree
nodes
Xiangrui Meng created SPARK-3086:
------------------------------------
Summary: Use 1-indexing for decision tree nodes
Key: SPARK-3086
URL: https://issues.apache.org/jira/browse/SPARK-3086
Project: Spark
Issue Type: Improvement
Components: MLlib
Reporter: Xiangrui Meng
Priority: Minor
1-indexing is good for binary trees. The root node gets index 1. And for any node with index i, its left child is (i << 1), right child is (i << 1) + 1, parent is (i >> 1), and its level is `java.lang.Integer.highestOneBit(idx)` (also 1-indexing for levels).
--
This message was sent by Atlassian JIRA
(v6.2#6252)
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@spark.apache.org
For additional commands, e-mail: issues-help@spark.apache.org