stages_csbhc: 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
)
Value
The final staged event tree obtained.
Arguments
- object
an object of class sevt
with fitted probabilities and
data, as returned by full
or sevt_fit
.
- 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
object$name_unobserved
.
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.
Examples
Run this codemodel <- stages_csbhc(full(Titanic))
summary(model)
Run the code above in your browser using DataLab