We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 13388c5 commit 6da8bdfCopy full SHA for 6da8bdf
r-package/policytree/R/hybrid_policy_tree.R
@@ -177,10 +177,8 @@ unpack_tree <- function(tree) {
177
nodes
178
}
179
180
-# Convert an adjacency list to array for predictions.
181
-# see Rcppbindigs.cpp for details.
182
-# Future TODO: consider performing this here instead of in Rcppbindigs.
183
-# For "largish" depth it could also be sparse.
+# Convert an adjacency list to array for predictions (see Rcppbindigs.cpp for details).
+# The 5th column is just the node label according to the print() order a hybrid tree has.
184
tree_mat <- function(nodes, depth) {
185
num.nodes <- 2^(depth + 1) - 1
186
tree.array <- matrix(0, num.nodes, 5)
0 commit comments