# NOT RUN {
## example: iris dataset
library(forestRK) # load the package forestRK
# covariates of training data set
x.train <- x.organizer(iris[,1:4], encoding = "num")[c(1:25,51:75,101:125),]
# numericized class types of observations of training dataset
y.train <- y.organizer(iris[c(1:25,51:75,101:125),5])$y.new
## criteria.calculator() example
## calculate the Entropy of the original training dataset
criteria.calculator(x.node = x.train, y.new.node = y.train)
## calculate the Gini Index of the original training dataset
criteria.calculator(x.node = x.train, y.new.node = y.train, entropy = FALSE)
# }
Run the code above in your browser using DataLab