SlideShare a Scribd company logo
MSIM 410/510 Model Engineering
GeNIe for Bayesian Networks
Gornto 221
2:45-4:00pm
GeNIe | Introduction
GeNIe – Graphical Network Interface –
can be used to construct and simulate
Bayesian and Decision networks
• Graphically represent probability results
• Predict probability of an outcome and
results of related variables
GeNIe Interface
GeNIe | Download
Installation Files – On Blackboard
Under Modules --> Modules 6: Statistical Based Modeling --> GeNIe 2. . 1 Download
GeNIe | GUI
Chance
Deterministic
Equation
Decision
Value
Connector
Textbox
Run/Simulate
Main Tools
GeNIe | Bayesian Network Example
Sprinkler Raining
Wet
Grass
P(S) = 0.2 P(R) = 0.4
P(W|R, S) = 0.95
P(W|R, ~S) = 0.90
P(W|~R, S) = 0.90
P(W|~R, ~S) = 0.10
P(S=T) P(S=F)
0.2 0.8
P(R=T) P(R=F)
0.4 0.6
S R P(W=T|S, R) P(W=F|S, R)
T T 0.95 0.05
T F 0.90 0.10
F T 0.90 0.10
F F 0.10 0.90
GeNIe | Bayesian Network Example
Sprinkler Raining
Wet
Grass
P(S) = 0.2 P(R) = 0.4
P(W|R, S) = 0.95
P(W|R, ~S) = 0.90
P(W|~R, S) = 0.90
P(W|~R, ~S) = 0.10
Sprinkler On 0.2
Sprinkler Off 0.8
Raining 0.4
Not Raining 0.6
Sprinkler Sprinkler On Sprinkler Off
Raining Raining Not Raining Raining Not Raining
Wet Grass 0.95 0.9 0.9 0.1
Dry Grass 0.05 0.1 0.1 0.9
GeNIe | Bayesian Network Example
Raining
P(S) = 0.2 P(R) = 0.4
P(W|R, S) = 0.95
P(W|R, ~S) = 0.90
P(W|~R, S) = 0.90
P(W|~R, ~S) = 0.10
Use the “Chance” Tool to create three “Chances”
Sprinkler
Wet
Grass
GeNIe | Bayesian Network Example
Raining
P(S) = 0.2 P(R) = 0.4
P(W|R, S) = 0.95
P(W|R, ~S) = 0.90
P(W|~R, S) = 0.90
P(W|~R, ~S) = 0.10
Sprinkler
Wet
Grass
Use the “Arc” Tool to connect
GeNIe | Bayesian Network Example
Raining
P(S) = 0.2 P(R) = 0.4
P(W|R, S) = 0.95
P(W|R, ~S) = 0.90
P(W|~R, S) = 0.90
P(W|~R, ~S) = 0.10
Sprinkler
Wet
Grass
Double click on the “Sprinkler Chance”, go to the “Definition”
tab and change the two states as the ones shown in the figure
above.
GeNIe | Bayesian Network Example
Raining
P(S) = 0.2 P(R) = 0.4
P(W|R, S) = 0.95
P(W|R, ~S) = 0.90
P(W|~R, S) = 0.90
P(W|~R, ~S) = 0.10
Sprinkler
Wet
Grass
Double click on the “Raining Chance”, go to the “Definition”
tab and change the two states as the ones shown in the figure
above.
GeNIe | Bayesian Network Example
Raining
P(S) = 0.2 P(R) = 0.4
P(W|R, S) = 0.95
P(W|R, ~S) = 0.90
P(W|~R, S) = 0.90
P(W|~R, ~S) = 0.10
Sprinkler
Wet
Grass
Double click on the “Wet Grass Chance”, go to the
“Definition” tab and change the two states as the ones shown
in the figure above.
GeNIe | Bayesian Network Example
Raining
P(S) = 0.2 P(R) = 0.4
P(W|R, S) = 0.95
P(W|R, ~S) = 0.90
P(W|~R, S) = 0.90
P(W|~R, ~S) = 0.10
Sprinkler
Wet
Grass
The probability that the grass is wet?
GeNIe | Bayesian Network Example
1. Run the simulation
2. Check the results by
double clicking the
“Wet Grass” chance
then go to the “Value”
tab
GeNIe | Bayesian Network Example
Raining
P(S) = 0.2 P(R) = 0.4
P(W|R, S) = 0.95
P(W|R, ~S) = 0.90
P(W|~R, S) = 0.90
P(W|~R, ~S) = 0.10
Sprinkler
Wet
Grass
Given that the sprinkler is on, what is the
probability that the grass is wet?
GeNIe | Bayesian Network Example
Since we know that the sprinkler is on, we need to set “Sprinkler On” as
the evidence.
• Right click on the little check mark of the “Sprinkler” chance, “Set
Evidence” - > “SprinklerON”
GeNIe | Bayesian Network Example
1. Run the simulation again
2. Check the results by
double clicking the
“Wet Grass” chance
then go to the “Value”
tab
GeNIe | Decision Network Example
GeNIe | Decision Network Example
An Expected Utility “score” is to be determined for each possible decision outcome, and the Highest
Expected Utility points to the “best” decision that can be made.
Calculating Highest Expected Utility:
First calculate Expected Utility (EU) for: if John decides to pay for the boat
P(FC=Y) * U(FC|JP=Y) + P(FC=N) * U(FC=Y|JP=Y)
= (0.4 * 0.55 + 0.6 * 0.25) * 100 + (0.4 * 0.45 + 0.6 * 0.75) * -50
= 5.5
Next calculate EU for: if John decides to Not pay for the boat
P(FC=Y) * U(FC|JP=N) + P(FC=N) * U(FC=N|JP=N)
= (0.4 * 0.55 + 0.6 * 0.25) * 25 + (0.4 * 0.45 + 0.6 * 0.75) * -25
= -6.5
The Highest Expected Utility is derived from the case where John decides to pay for the Boat, so that will be his decision.
GeNIe | Decision Network Example
Chance
Chance
Value
Decision
GeNIe | Decision Network Example
GeNIe | Decision Network Example
GeNIe | Decision Network Example
GeNIe | Decision Network Example
GeNIe | Decision Network Example
if John decides to pay for the boat
GeNIe | Decision Network Example
if John decides to not pay for the boat
GeNIe | Decision Network Example
Burglary (B) and earthquake (E) directly affect the
probability of the alarm (A) going off, but whether or not
John calls (J) or Mary calls (M) depends only on the alarm.
Your tasks:
1. Construct this network using GeNIe.
2. Investigate these two questions by running the
simulation in GeNIe
a. What is the probability that there is a
burglary given that John calls?
b. What about if Mary also calls right after
John hangs up?
3. Record the results from GeNIe by using screenshot and paste them to a word doc. Turn in both your model file
and doc file on Blackboard by the end of class. Please do not submit .zip or .rar files.
The End

More Related Content

PPTX
Machine Learning with R
PPTX
Group and Community Detection in Social Networks
PPTX
Hidden Markov Model
PPTX
Probabilistic Reasoning
PPTX
Exploring Data
PPTX
Bayesian network
PDF
8. R Graphics with R
 
PDF
Solving non linear programming minimization problem using genetic algorithm
Machine Learning with R
Group and Community Detection in Social Networks
Hidden Markov Model
Probabilistic Reasoning
Exploring Data
Bayesian network
8. R Graphics with R
 
Solving non linear programming minimization problem using genetic algorithm

What's hot (20)

PPTX
Classical relations and fuzzy relations
PPT
2.1 Data Mining-classification Basic concepts
PPT
String matching algorithm
PDF
Bayes Theorem.pdf
PPTX
Data Management in R
PPTX
Decision Tree Learning
PPTX
Random Forest In R | Random Forest Algorithm | Random Forest Tutorial |Machin...
PDF
R data-import, data-export
 
PPT
Covering (Rules-based) Algorithm
PPTX
Programming in R
PPTX
Belief Networks & Bayesian Classification
PPTX
Association rule mining and Apriori algorithm
PPTX
Over fitting underfitting
PDF
Logistic regression
PDF
Introduction to R
PPTX
Machine Learning and Causal Inference
PPTX
Certinity Factor and Dempster-shafer theory .pptx
PDF
Logistic Regression in Python | Logistic Regression Example | Machine Learnin...
PPTX
PROLOG: Introduction To Prolog
PPTX
Genetic algorithms
Classical relations and fuzzy relations
2.1 Data Mining-classification Basic concepts
String matching algorithm
Bayes Theorem.pdf
Data Management in R
Decision Tree Learning
Random Forest In R | Random Forest Algorithm | Random Forest Tutorial |Machin...
R data-import, data-export
 
Covering (Rules-based) Algorithm
Programming in R
Belief Networks & Bayesian Classification
Association rule mining and Apriori algorithm
Over fitting underfitting
Logistic regression
Introduction to R
Machine Learning and Causal Inference
Certinity Factor and Dempster-shafer theory .pptx
Logistic Regression in Python | Logistic Regression Example | Machine Learnin...
PROLOG: Introduction To Prolog
Genetic algorithms
Ad

Similar to Bayesian networks tutorial with genie (20)

PDF
Lecture_12b_08.pdf
PDF
Efficient Random-Walk Methods forApproximating Polytope Volume
PPT
cps170_bayes_nets.ppt
PPT
Bayes_Theorem.ppt
PDF
Papoulis%20 solutions%20manual%204th%20edition 1
PPT
Bayes Classification
PPT
9-Decision Tree Induction-23-01-2025.ppt
PDF
Digital Notes
PDF
Lec 3 continuous random variable
PPT
Bayes_Theorem - conditional__Probability
PDF
A/B Testing for Game Design
PDF
PPTX
Gen Math Lesson 1.pptx
PDF
Is Sized Typing for Coq Practical?
PDF
Tensor Completion for PDEs with uncertain coefficients and Bayesian Update te...
PDF
Douglas C. Montgomery, Sol_125240.pdf
PDF
The Existence of Maximal and Minimal Solution of Quadratic Integral Equation
PDF
Bode Plot Notes Step by Step
PDF
Probability and stochastic processes 3rd edition Quiz Solutions
PDF
ZK Study Club: Sumcheck Arguments and Their Applications
Lecture_12b_08.pdf
Efficient Random-Walk Methods forApproximating Polytope Volume
cps170_bayes_nets.ppt
Bayes_Theorem.ppt
Papoulis%20 solutions%20manual%204th%20edition 1
Bayes Classification
9-Decision Tree Induction-23-01-2025.ppt
Digital Notes
Lec 3 continuous random variable
Bayes_Theorem - conditional__Probability
A/B Testing for Game Design
Gen Math Lesson 1.pptx
Is Sized Typing for Coq Practical?
Tensor Completion for PDEs with uncertain coefficients and Bayesian Update te...
Douglas C. Montgomery, Sol_125240.pdf
The Existence of Maximal and Minimal Solution of Quadratic Integral Equation
Bode Plot Notes Step by Step
Probability and stochastic processes 3rd edition Quiz Solutions
ZK Study Club: Sumcheck Arguments and Their Applications
Ad

Recently uploaded (20)

PPTX
Fundamentals of safety and accident prevention -final (1).pptx
PDF
Visual Aids for Exploratory Data Analysis.pdf
PPTX
communication and presentation skills 01
PDF
Analyzing Impact of Pakistan Economic Corridor on Import and Export in Pakist...
PDF
UNIT no 1 INTRODUCTION TO DBMS NOTES.pdf
PPT
Total quality management ppt for engineering students
PDF
Integrating Fractal Dimension and Time Series Analysis for Optimized Hyperspe...
PDF
BIO-INSPIRED HORMONAL MODULATION AND ADAPTIVE ORCHESTRATION IN S-AI-GPT
PPTX
UNIT 4 Total Quality Management .pptx
PDF
737-MAX_SRG.pdf student reference guides
PPT
Occupational Health and Safety Management System
PPTX
Current and future trends in Computer Vision.pptx
PDF
PPT on Performance Review to get promotions
PPTX
MET 305 2019 SCHEME MODULE 2 COMPLETE.pptx
PDF
III.4.1.2_The_Space_Environment.p pdffdf
PPTX
Safety Seminar civil to be ensured for safe working.
PDF
Enhancing Cyber Defense Against Zero-Day Attacks using Ensemble Neural Networks
PDF
Unit I ESSENTIAL OF DIGITAL MARKETING.pdf
PPTX
Information Storage and Retrieval Techniques Unit III
PDF
Mitigating Risks through Effective Management for Enhancing Organizational Pe...
Fundamentals of safety and accident prevention -final (1).pptx
Visual Aids for Exploratory Data Analysis.pdf
communication and presentation skills 01
Analyzing Impact of Pakistan Economic Corridor on Import and Export in Pakist...
UNIT no 1 INTRODUCTION TO DBMS NOTES.pdf
Total quality management ppt for engineering students
Integrating Fractal Dimension and Time Series Analysis for Optimized Hyperspe...
BIO-INSPIRED HORMONAL MODULATION AND ADAPTIVE ORCHESTRATION IN S-AI-GPT
UNIT 4 Total Quality Management .pptx
737-MAX_SRG.pdf student reference guides
Occupational Health and Safety Management System
Current and future trends in Computer Vision.pptx
PPT on Performance Review to get promotions
MET 305 2019 SCHEME MODULE 2 COMPLETE.pptx
III.4.1.2_The_Space_Environment.p pdffdf
Safety Seminar civil to be ensured for safe working.
Enhancing Cyber Defense Against Zero-Day Attacks using Ensemble Neural Networks
Unit I ESSENTIAL OF DIGITAL MARKETING.pdf
Information Storage and Retrieval Techniques Unit III
Mitigating Risks through Effective Management for Enhancing Organizational Pe...

Bayesian networks tutorial with genie

  • 1. MSIM 410/510 Model Engineering GeNIe for Bayesian Networks Gornto 221 2:45-4:00pm
  • 2. GeNIe | Introduction GeNIe – Graphical Network Interface – can be used to construct and simulate Bayesian and Decision networks • Graphically represent probability results • Predict probability of an outcome and results of related variables GeNIe Interface
  • 3. GeNIe | Download Installation Files – On Blackboard Under Modules --> Modules 6: Statistical Based Modeling --> GeNIe 2. . 1 Download
  • 5. GeNIe | Bayesian Network Example Sprinkler Raining Wet Grass P(S) = 0.2 P(R) = 0.4 P(W|R, S) = 0.95 P(W|R, ~S) = 0.90 P(W|~R, S) = 0.90 P(W|~R, ~S) = 0.10 P(S=T) P(S=F) 0.2 0.8 P(R=T) P(R=F) 0.4 0.6 S R P(W=T|S, R) P(W=F|S, R) T T 0.95 0.05 T F 0.90 0.10 F T 0.90 0.10 F F 0.10 0.90
  • 6. GeNIe | Bayesian Network Example Sprinkler Raining Wet Grass P(S) = 0.2 P(R) = 0.4 P(W|R, S) = 0.95 P(W|R, ~S) = 0.90 P(W|~R, S) = 0.90 P(W|~R, ~S) = 0.10 Sprinkler On 0.2 Sprinkler Off 0.8 Raining 0.4 Not Raining 0.6 Sprinkler Sprinkler On Sprinkler Off Raining Raining Not Raining Raining Not Raining Wet Grass 0.95 0.9 0.9 0.1 Dry Grass 0.05 0.1 0.1 0.9
  • 7. GeNIe | Bayesian Network Example Raining P(S) = 0.2 P(R) = 0.4 P(W|R, S) = 0.95 P(W|R, ~S) = 0.90 P(W|~R, S) = 0.90 P(W|~R, ~S) = 0.10 Use the “Chance” Tool to create three “Chances” Sprinkler Wet Grass
  • 8. GeNIe | Bayesian Network Example Raining P(S) = 0.2 P(R) = 0.4 P(W|R, S) = 0.95 P(W|R, ~S) = 0.90 P(W|~R, S) = 0.90 P(W|~R, ~S) = 0.10 Sprinkler Wet Grass Use the “Arc” Tool to connect
  • 9. GeNIe | Bayesian Network Example Raining P(S) = 0.2 P(R) = 0.4 P(W|R, S) = 0.95 P(W|R, ~S) = 0.90 P(W|~R, S) = 0.90 P(W|~R, ~S) = 0.10 Sprinkler Wet Grass Double click on the “Sprinkler Chance”, go to the “Definition” tab and change the two states as the ones shown in the figure above.
  • 10. GeNIe | Bayesian Network Example Raining P(S) = 0.2 P(R) = 0.4 P(W|R, S) = 0.95 P(W|R, ~S) = 0.90 P(W|~R, S) = 0.90 P(W|~R, ~S) = 0.10 Sprinkler Wet Grass Double click on the “Raining Chance”, go to the “Definition” tab and change the two states as the ones shown in the figure above.
  • 11. GeNIe | Bayesian Network Example Raining P(S) = 0.2 P(R) = 0.4 P(W|R, S) = 0.95 P(W|R, ~S) = 0.90 P(W|~R, S) = 0.90 P(W|~R, ~S) = 0.10 Sprinkler Wet Grass Double click on the “Wet Grass Chance”, go to the “Definition” tab and change the two states as the ones shown in the figure above.
  • 12. GeNIe | Bayesian Network Example Raining P(S) = 0.2 P(R) = 0.4 P(W|R, S) = 0.95 P(W|R, ~S) = 0.90 P(W|~R, S) = 0.90 P(W|~R, ~S) = 0.10 Sprinkler Wet Grass The probability that the grass is wet?
  • 13. GeNIe | Bayesian Network Example 1. Run the simulation 2. Check the results by double clicking the “Wet Grass” chance then go to the “Value” tab
  • 14. GeNIe | Bayesian Network Example Raining P(S) = 0.2 P(R) = 0.4 P(W|R, S) = 0.95 P(W|R, ~S) = 0.90 P(W|~R, S) = 0.90 P(W|~R, ~S) = 0.10 Sprinkler Wet Grass Given that the sprinkler is on, what is the probability that the grass is wet?
  • 15. GeNIe | Bayesian Network Example Since we know that the sprinkler is on, we need to set “Sprinkler On” as the evidence. • Right click on the little check mark of the “Sprinkler” chance, “Set Evidence” - > “SprinklerON”
  • 16. GeNIe | Bayesian Network Example 1. Run the simulation again 2. Check the results by double clicking the “Wet Grass” chance then go to the “Value” tab
  • 17. GeNIe | Decision Network Example
  • 18. GeNIe | Decision Network Example An Expected Utility “score” is to be determined for each possible decision outcome, and the Highest Expected Utility points to the “best” decision that can be made. Calculating Highest Expected Utility: First calculate Expected Utility (EU) for: if John decides to pay for the boat P(FC=Y) * U(FC|JP=Y) + P(FC=N) * U(FC=Y|JP=Y) = (0.4 * 0.55 + 0.6 * 0.25) * 100 + (0.4 * 0.45 + 0.6 * 0.75) * -50 = 5.5 Next calculate EU for: if John decides to Not pay for the boat P(FC=Y) * U(FC|JP=N) + P(FC=N) * U(FC=N|JP=N) = (0.4 * 0.55 + 0.6 * 0.25) * 25 + (0.4 * 0.45 + 0.6 * 0.75) * -25 = -6.5 The Highest Expected Utility is derived from the case where John decides to pay for the Boat, so that will be his decision.
  • 19. GeNIe | Decision Network Example Chance Chance Value Decision
  • 20. GeNIe | Decision Network Example
  • 21. GeNIe | Decision Network Example
  • 22. GeNIe | Decision Network Example
  • 23. GeNIe | Decision Network Example
  • 24. GeNIe | Decision Network Example if John decides to pay for the boat
  • 25. GeNIe | Decision Network Example if John decides to not pay for the boat
  • 26. GeNIe | Decision Network Example Burglary (B) and earthquake (E) directly affect the probability of the alarm (A) going off, but whether or not John calls (J) or Mary calls (M) depends only on the alarm. Your tasks: 1. Construct this network using GeNIe. 2. Investigate these two questions by running the simulation in GeNIe a. What is the probability that there is a burglary given that John calls? b. What about if Mary also calls right after John hangs up? 3. Record the results from GeNIe by using screenshot and paste them to a word doc. Turn in both your model file and doc file on Blackboard by the end of class. Please do not submit .zip or .rar files.