Learn R Programming

pauwels2014 (version 1.0)

estimate_risk_out_all: Expected risk estimation.

Description

Estimates the expected risk associated to a given experiment for all possible observations to be performed.

Usage

estimate_risk_out_all(thetas, knobj, experiment_fun)

Arguments

thetas
A sample from the posterior associated to the knoweldge list knobjs.
knobj
A knowledge list. See knobjs.
experiment_fun
A function that represents the molecular perturbation to be performed. See experiment_list1.

Value

A dataframe with the following columns
Measurement
Factor representing possible measurements. See observables.
Risk
The risk associated to this measurement.
Cost
The cost associated to this measurement.

Details

This implements the risk estimation procedure described in the paper. We use importance weighting to perform computation based on a single posterior sample. The global variable observables should be defined.

Examples

Run this code
data(experiment_list1)
data(observables)
data(knobjs)
sapply(	
	1:length(knobjs),
	function(k){
		assign(names(knobjs)[k], 
			knobjs[[k]], envir = .GlobalEnv)
	}
)

knobjActMult1$global_parameters$n_simu_weights <- 3

estimate_risk_out_all(knobjActMult1$datas[[1]]$thetas[1:10,], 
	knobjActMult1, experiment_list1$nothing)

Run the code above in your browser using DataLab