search_greedy: Greedy Order Search

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

search_greedyR Documentation

Greedy Order Search

Description

Search the optimal staged event tree with a greedy heuristic.

Usage

search_greedy(
  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

The greedy approach implemented in this function iteratively adds variables to the staged tree that better improve the search_criterion.

Value

The estimated staged event tree model.

Examples

model <- search_greedy(Titanic, alg = stages_fbhc)
print(model)

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