You are on page 1of 6

Converting a generic BN to discrete BN

MODELING and DECISION MAKING USING BAYESIAN STATISTICS Part II Samu Mntyniemi

Why?
Single case inference in the generic domain is slow Single case inference in discrete domain is fast
But learning continuous parameters is difficult

Remedy:
Learn continuous paramaters using (Markov Chain) Monte Carlo Predict a single case using Monte Carlo, then transport to discrete network

OpenBUGS and GeNie


OpenBUGS
Predict a missing case using NA in data Export the simulated values (coda in the Sample Monitor Tool)

Excel, R, Matlab etc


Arrange the simulated values into a tab-delimited text file

GeNie
Learn the network from the text file, force the arcs based on the known model structure

Exercise I
Take a look at the BUGS code for diagnosing inflammation based on body temperature Modify the code so that the prior distribution elicited in the previous exercise becomes utilised Think of a new person who is judged to have inflammation with probability 0.6
m[2]~dnorm(38,1) # InflammationHow does the

The body temperature was found to be 37.1. What is the probability that the person has inflammation?

p[1]<-0.4 # 40:60 chance of inflammation p[2]<-0.6 predictive distribution of the body temperature of that person look like?

Exercise II
Learn the distribution of body temperature for healthy and sick populations from data
10 persons with inflammation ,10 with no inflammation Use the elicited prior for the mean of the population with inflammation How does the predictive distribution of the body temperature of that person look like? The body temperature was found to be 37.1. What is the probability that the person has inflammation?

Think of a new person who is judged to have inflammation with probability 0.6

37.1 END

NA

Exercise III
Transport the MCMC simulation results to GeNie Repeat the calculations of exercise II

You might also like