Description Usage Arguments Examples
View source: R/choose_int.nv.R
Computes the most useful intervention according to a target function. Requires a dataframe called li in the global workspace that encodes the likelihoods of any outcome of any intervention created with likelihood() Requires a dataframe called o which incodes the outcome space (see example)
1 | choose_int.nv(ints, g, pDist, FUN, ...)
|
ints |
matrix of possible interventions (rows), 1 is on, 0 is free, -1 is off. |
g |
matrix of hypothesis graphs, one line is one graph to be written by row to a matrix. |
pDist |
is the prior distribution over these graphs. |
FUN |
is the objective function of your choice. Additional arguments can then be passed to this objective function |
1 2 3 4 5 6 | ints<-as.matrix(expand.grid(rep(list(0:2), 3)))
ints[ints==2]<--1
o<-expand.grid(rep(list(0:1 ), sqrt(dim(g)[2])))
dist<-prior('flat',g)
li<-likelihood(g,.1,.8)
choose_int.nv(ints, g, dist, FUN=shannon_entropy)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.