NodesInfo.Rd
Retrieves informations about terminal nodes of a conditional inference tree : node id, rule set, frequency, prediction or class probabilities.
NodesInfo(ct)
A tree of class constparty
(as returned by ctree
from partykit
package).
A data frame.
Hothorn T, Hornik K, Van De Wiel MA, Zeileis A. "A lego system for conditional inference". The American Statistician. 60:257–263, 2006.
Hothorn T, Hornik K, Zeileis A. "Unbiased Recursive Partitioning: A Conditional Inference Framework". Journal of Computational and Graphical Statistics, 15(3):651-674, 2006.
ctree
data(iris)
iris2 = iris
iris2$Species = factor(iris$Species == "versicolor")
iris.ct = partykit::ctree(Species ~ ., data = iris2)
NodesInfo(iris.ct)
#> id rule freq prob.FALSE prob.TRUE
#> 3 3 Sepal.Width <= 2.9 & Petal.Width <= 1.6 39 0.1282051 0.87179487
#> 4 4 Sepal.Width <= 2.9 & Petal.Width > 1.6 18 1.0000000 0.00000000
#> 6 6 Sepal.Width > 2.9 & Sepal.Width <= 3.3 56 0.7321429 0.26785714
#> 7 7 Sepal.Width > 2.9 & Sepal.Width > 3.3 37 0.9729730 0.02702703