aggregate-graphs: Aggregate a list of causality.graphs into a single object

Description Usage Arguments Details Author(s) Examples

Description

aggregate_graphs will combine graphs into an "aggregated.causality.graph" object which can be used for bootstrapping and jackknifing causal discovery algorithms among other things.

Usage

1
2
3
aggregate_graphs(graphs, filter = 0.1, weights = NULL)

coalesce(aggregated.graph)

Arguments

graphs

A list of causality.graphs. Each graph must have the same nodes.

filter

Numeric between 0 and 1. aggregate_graphs filters out rows that sum to less than filter.

weights

An optional vector of graph weights to be used in the aggregation process. If weights is not supplied, it defaults to length(graphs). If weights is non NULL, the length of weights must equal the length of graphs, the sum of weights must be greater than 0, and each weight must be non-negative.

aggregated.graph

An aggregated.causality.graph that you wish to turn into a causality graph.

Details

TODO

Author(s)

Alexander Rix

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
# jackknife ges
n.jks   <- 10
jk.frac <- .9
n.obs   <- nrow(ecoli.df)
graphs  <- vector("list", n.jks)
for (i in 1:n.jks) {
 ecoli.jk <- ecoli.df[sample(n.obs, n.obs * jk.frac, replace = FALSE),]
 graphs[[i]] <- ges(ecoli.jk, "bic", penalty = 1)
}
aggregated <- aggregate_graphs(graphs)

tzimiskes/causality documentation built on Sept. 15, 2019, 8:41 p.m.