def class Tree:
"""Array-based representation of a binary decision tree.
The binary tree is represented as a number of parallel arrays. The i-th
element of each array holds information about the node `i`. Node 0 is the
tree's root. You can find a detailed description of all arrays in
`_tree.pxd`. NOTE: Some of the arrays only apply to either leaves or split
nodes, resp. In this case the values of nodes of the other type are
arbitrary!
从tree.pyx:
所以节点[0]是指根。要添加节点,它在叶子上使用一个splitter类,该类可以基于杂质改善程度更高的叶子分割节点,或者使用深度优先分割。我没有研究将节点添加到并行中的顺序,但我猜测它们是按照创建它们的顺序添加的,如果树是按顺序排列的,那么这将“类似于”预顺序横向
相关问题 更多 >
编程相关推荐