# NOT RUN {
## example: iris dataset
## load the forestRK package
library(forestRK)
# covariates of training data set
x.train <- x.organizer(iris[,1:4], encoding = "num")[c(1:25,51:75,101:125),]
y.train <- y.organizer(iris[c(1:25,51:75,101:125),5])$y.new
# Construct a tree
# min.num.obs.end.node.tree is set to 5 by default;
# entropy is set to TRUE by default
tree.entropy <- construct.treeRK(x.train, y.train)
# Find indices of end nodes of tree.entropy
end.node.index <- ends.index.finder(tree.entropy$flag)
# }
Run the code above in your browser using DataLab