Learn R Programming

gRaven (version 1.1.10)

initialize.domain: Re-initialise a gRaven domain

Description

Re-initialise a gRaven domain

Usage

initialize.domain(domain)

Value

a NULL value is invisibly returned.

Arguments

domain

name of gRaven domain

Author

Peter J. Green, P.J.Green@bristol.ac.uk

Details

Emulates function of the same name in the RHugin package. Restores the domain to the state it was in after the call to compile, in particular erasing all entered evidence.

Examples

Run this code
demo("chest",package="gRaven",echo=FALSE)
compile(chest)
chest
set.finding(chest,"asia","yes")
set.finding(chest,"dysp","no")
propagate(chest)
sapply(get.nodes(chest),function(x) get.belief(chest,x)) 
get.normalization.constant(chest)

initialize.domain(chest)
sapply(get.nodes(chest),function(x) get.belief(chest,x)) 
get.normalization.constant(chest)

Run the code above in your browser using DataLab