choose_int.recursive: Get n-step-ahead intervention values

Description Usage Arguments Examples

View source: R/choose_int.recursive.R

Description

Computes the most useful intervention recursively 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
2
choose_int.recursive(ints, p_dist.old, Z.old = 1, li_c.old = as.matrix(1),
  depth = 0, n_steps = 1, compute_value = 1)

Arguments

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

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.

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.recursive(ints, dist, n_steps=2, compute_value=0)

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