#grow a tree on the Pima Indian dataset
data(Pima.tr, package = "MASS")
ob.tree <- oblique.tree(formula = type~.,
data = Pima.tr,
oblique.splits = "on")
plot(ob.tree);title(main="Oblique Tree")
#prune 1 subtree
plot( oblique.tree:::oblique.tree.prune.nodes(
tree = ob.tree,
list.of.node.names.to.prune = list(c(5,10,11,22,23,46,47,94,95))
)
);title(main="Prune one Subtree")
Run the code above in your browser using DataLab