Greedy search of staged event trees with iterative joining of stages.
stages_csbhc(
object,
score = function(x) {
return(-BIC(x$ll))
},
max_iter = Inf,
scope = NULL,
ignore = object$name_unobserved
)
The final staged event tree obtained.
an object of class sevt
with fitted probabilities and
data, as returned by full
or sevt_fit
.
the score function to be maximized.
the maximum number of iterations per variable.
names of variables that should be considered for the optimization.
vector of stages which will be ignored and left untouched,
by default the name of the unobserved stages stored in
object$name_unobserved
.
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.
model <- stages_csbhc(full(Titanic))
summary(model)
Run the code above in your browser using DataLab