Description Usage Arguments Value Note Examples
View source: R/dynamic_inference.R
Runs belief update from a piece of dynamic evidence over a dynamic Bayesian network
1 2 | dynamic_importance_sampling(dyn_network, target_variable, dyn_evidence,
sample_size = 50)
|
dyn_network |
a java object of class |
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. |
a data.frame
with the posterior distribution over the target
variable on the different time slices.
The function uses importance sampling and is based on the factored frontier method, see the AMIDST toolbox documentation.
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")
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.