dynamic_importance_sampling: Runs belief update from a piece of dynamic evidence over a...

Description Usage Arguments Value Note Examples

View source: R/dynamic_inference.R

Description

Runs belief update from a piece of dynamic evidence over a dynamic Bayesian network

Usage

1
2
dynamic_importance_sampling(dyn_network, target_variable, dyn_evidence,
  sample_size = 50)

Arguments

dyn_network

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

target_variable

the name of the variable over which the posterior distribution will be computed

dyn_evidence

the observations over the dynamic Bayesian network.

sample_size

the size of the sample used to estimate the posterior distribution.

Value

a data.frame with the posterior distribution over the target variable on the different time slices.

Note

The function uses importance sampling and is based on the factored frontier method, see the AMIDST toolbox documentation.

Examples

1
2
3
4
5
network <- dbn_generator(1,2,2)
print_amidst_bn(network)
stream <- generate_stream_from_dbn(network,1,10,"ClassVar")
resultsIS <- dynamic_importance_sampling(network,"ClassVar",stream)
plot(resultsIS[,2],type="l",ylim = c(0,1),col="red",xlab="Time slice",ylab="Prob. ClassVar = 1")

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