choose_int.nv: Choose intervention with your own choice of value function

Description Usage Arguments Examples

View source: R/choose_int.nv.R

Description

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)

Usage

1
choose_int.nv(ints, g, pDist, FUN, ...)

Arguments

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

Examples

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)

neilbramley/acl_source documentation built on May 29, 2019, 6:53 p.m.