Description Usage Arguments Details Value References See Also Examples
Perform exact inference in a causal independence Bayesian network through the joint tree algorithm (interface to the gRain
package)
1 | query.cibn(x, target=NULL, evidence=NULL, type="marginal")
|
x |
An object of class |
target |
The name of the target variable. If |
evidence |
A named list with each component indicating the evidence on a specific variable in the form of a vector of state names. See the examples below. |
type |
A character string indicating the type of inference: |
This function is an interface to function querygrain
in the gRain
package.
A list with one component for each variable in the Bayesian network, indicating its probability distribution given the evidence.
S. L. Lauritzen and D. J. Spiegelhalter (1988). Local computations with probabilities on graphical structures and their application to expert systems. Journal of the Royal Statistical Society, Series B (Methodological), 50(2): 157-224. DOI: 10.1023/A:1008935617754.
new.cibn; sample.cibn.
1 2 3 4 5 6 7 8 | data(bankrisk_code)
bankrisk_bn <- new.cibn(bankrisk_code)
#
getStates(bankrisk_bn) ## see the sample spaces
#
query.cibn(bankrisk_bn, target="Risk", evidence=list(Age="31_50",Portf="mixed"))
query.cibn(bankrisk_bn, target="Risk", evidence=list(Age="31_50",Portf="money_market"))
query.cibn(bankrisk_bn, target="Risk", evidence=list(Age="31_50",Portf="stock_market"))
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.