search_best: Optimal Order Search

View source: R/9-search-order.R

search_bestR 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 stages_bhc or stages_hclust. The function alg must accept the argument scope.

search_criterion

the criterion minimized in the order search.

lambda

numerical value passed to full.

join_unobserved

logical, passed to full.

...

additional arguments, passed to alg.

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"))

stagedtrees documentation built on April 29, 2022, 1:06 a.m.