fix_node: Simulate experimental data

Description Usage Arguments Details Value

Description

The bnlearn package uses the rbn function to simulate data from a Bayesian network. The following functions simulate a special set of datasets.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
fix_node(fitted_net, node, level, n)

rbn_fixed(fitted_net, n)

do_int(fitted_net, node, level, n)

rbn_ideal(fitted_net, n, targets = names(fitted_net))

rbn_inhibition(fitted_net, n, targets = names(fitted_net))

rbn_activation(fitted_net, n, targets = names(fitted_net))

Arguments

fitted_net

a fitted Bayesian network, object of class bn.fit

level

the factor level of node where the intervention will fix

n

the number of observations to simulate.

the

name of node to targeted for intervention

Details

The conditional probabilities in the Bayesian network may be such that some outcomes are highly improbable. When some variables rarely or never take on certain states in the data, it can be difficult to infer network structure.

fix_node simulates data by fixing a single variable at one of its levels and simulating from the resulting conditional probability distribution of the other variables given the fix.

rbn_fixed uses fix_node to simulate a full dataset by fixing each node at each of its levels. The resulting data does not match the underlying joint distribution because the marginal distributions are changed. However, the simulation will sample low probability outcomes, making it easy to detect pairwise relationships between nodes. In systems biology, this is analogous to a set of broad perturbations that enable full measurement of the sample space.

do_int simulates data by applying a targeted intervention that fixes a single variable at one of its levels, creating a mutilated network where the target is d-seperated from all of its ancestors in the original network, i.e. Pearl's do-calculus.

rbn_ideal uses do_int to simulate a full dataset by applying a targeted intervention to each node, fixing the target at each of its levels.

rbn_inhibition uses do_int to simulate a full dataset by applying a targeted intervention to each node, fixing the target at its lowest level. The lowest level is assumed to be the first level of the factor's levels.

rbn_activation uses do_int to simulate a full dataset by applying a targeted intervention to each node, fixing the target at its highest level. The highest level is assumed to be the first level of the factor's levels.

Value

a data frame of simulated observations corresponding to the intervention. If applicable, the data frame contains a 'target' attribute containing a character vector, the ith element of the vector is the intervention target in the ith row.


robertness/bninfo documentation built on May 27, 2019, 10:32 a.m.