Open VMJim opened 8 years ago
Reproducible example:
library(reprtree) library(randomForest) data(spam, package="kernlab") rf <- randomForest(type ~. , data = spam, ntree = 1) reptr <- ReprTree(rf, spam, metric = "d2")
Produces:
[1] "Constructing distance matrix..." Error in x[l, ] : subscript out of bounds
Solution: something like: if ntrees = 1, then representative tree is that tree
if ntrees = 1, then representative tree is that tree
Reproducible example:
Produces:
Solution: something like:
if ntrees = 1, then representative tree is that tree