search_best {stagedtrees} | R Documentation |
Optimal Order Search
Description
Find the optimal staged event tree with a dynamic programming approach.
Usage
search_best(
data,
alg = stages_bhc,
search_criterion = BIC,
lambda = 0,
join_unobserved = TRUE,
...
)
Arguments
data |
either a data.frame or a table containing the data. |
alg |
a function that performs stages structure estimation. Similar to
|
search_criterion |
the criterion minimized in the order search. |
lambda |
numerical value passed to |
join_unobserved |
logical, passed to |
... |
additional arguments, passed to |
Details
This function is an implementation of the
dynamic programming approach
of Silander and Leong (2013).
If the search_criterion
is decomposable
the returned model attains the best value
among all possible orders.
Value
The estimated staged event tree model.
References
Silander T., Leong TY. A Dynamic Programming Algorithm for Learning Chain Event Graphs. In: Fürnkranz J., Hüllermeier E., Higuchi T. (eds) Discovery Science. DS 2013. Lecture Notes in Computer Science, vol 8140. Springer, Berlin, Heidelberg. 2013.
Cowell R and Smith J. Causal discovery through MAP selection of stratified chain event graphs. Electronic Journal of Statistics, 8(1):965–997, 2014.
Examples
## default search using BIC score
model <- search_best(Titanic, alg = stages_kmeans)
## use df as search_criterion
model1 <- search_best(Titanic, alg = stages_bhc,
search_criterion = function(m) attr(logLik(m), "df"))