library("stablelearner")
library("partykit")
## tuning cforest using different values of its tuning parameter mtry
r <- tuner("cforest", tunerange = list(mtry = 1:4), formula = Species ~ ., data = iris)
## assess stability (with B = 10 for illustration to avoid excessive computation times)
stability(r, control = stab_control(seed = 1234, B = 10))
Call:
cforest(formula = Species ~ ., data = iris, mtry = 1L)
cforest(formula = Species ~ ., data = iris, mtry = 2L)
cforest(formula = Species ~ ., data = iris, mtry = 3L)
cforest(formula = Species ~ ., data = iris, mtry = 4L)
Sampler:
B = 10
Resampling method = Bootstrap sampling with 100.0% data
Evaluation method = OOB
## receive information about the range of tuning parameters
attr(r, "range") mtry
1 1
2 2
3 3
4 4