importance_sampling_from_stream: Runs Importance sampling evidence updating from an AMIDST...

Description Usage Arguments Value Note References Examples

View source: R/static_inference.R

Description

Runs Importance sampling evidence updating from an AMIDST data stream

Usage

1
2
importance_sampling_from_stream(network, target_variable, evidence_variables,
  input_stream, sample_size, parallel = T, seed = 3L)

Arguments

network

a java object of class BayesianNetwork over which the computations will be carried out

target_variable

a string representing the name of variable whose posterior distribution will be computed

evidence_variables

a vector with the names of the observed variables

input_stream

and AMIDST data stream

sample_size

the sample size to be used during the simulation

parallel

a boolean indicating whether or not the items in the sample will be generated in parallel (when allowed by the system)

seed

the seed for the genertion of random numbers

Value

a data.frame with the posterior distribution of the target variable for each item in the strea

Note

The function computes the posterior distribution given some evidence for all the items in the input stream.

References

A. Salmeron, D. Ramos-Lopez, H. Borchani, A.M. Martinez, A.R. Masegosa, A. Fernandez, H. Langseth, A.L. Madsen, T.D. Nielsen (2015) Parallel importance sampling in conditional linear Gaussian networks. CAEPIA'2015. Lecture Notes in Artificial Intelligence 9422, 36-46.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
network <- load_amidst_bn(system.file("extdata","WasteIncinerator.bn",
package="ramidst"))
sample_stream <- amidst_data_stream(system.file("extdata",
"WasteIncineratorSample.arff",package="ramidst"))
posterior <- importance_sampling_from_stream(network,"B",c("F","E"),
sample_stream,50L)
posterior
posterior <- importance_sampling_from_stream(network,"L",c("F","E"),
sample_stream,50L)
posterior

ramidst documentation built on May 30, 2017, 5:27 a.m.