stages_csbhc {stagedtrees} | R Documentation |
Context-specific Backward hill-climbing
Description
Greedy search of staged event trees with iterative joining of stages.
Usage
stages_csbhc(
object,
score = function(x) {
return(-BIC(x$ll))
},
max_iter = Inf,
scope = NULL,
ignore = object$name_unobserved
)
Arguments
object |
an object of class |
score |
the score function to be maximized. |
max_iter |
the maximum number of iterations per variable. |
scope |
names of variables that should be considered for the optimization. |
ignore |
vector of stages which will be ignored and left untouched,
by default the name of the unobserved stages stored in
|
Details
For each variable the algorithm tries to join stages , by adding context specific independences, and moves to the best model that increases the score. When no increase is possible it moves to the next variable.
Value
The final staged event tree obtained.
Examples
model <- stages_csbhc(full(Titanic))
summary(model)
[Package stagedtrees version 2.3.0 Index]