choose_int: Get intervention values

Description Usage Arguments Examples

View source: R/choose_int.R

Description

Computes the most useful intervention according to information, probability and utility gain. 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) Requires a matrix of interventions called ints, 1 is on, 0 is free, -1 is off.

Usage

1
choose_int(g, pG, compute_value = 1)

Arguments

g

matrix of hypothesis graphs, one line is one graph to be written by row to a matrix.

compute_value

defaults to 0=no. If 1 a value matrix C must be provided with a value for each judgement i given each true network j Additional arguments can then be passed to this objective function

pDist

is the prior distribution over these graphs.

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)
out<-choose_int(g, dist, compute_value=0)

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