Download presentation
Presentation is loading. Please wait.
Published byArron Bruce Modified over 9 years ago
1
Bayesian Networks COSC 4426 Brad Legault
2
Bayes’ Theorem “Bayes’ theorem is to probability theory what Pythagora’s theorem is to geometry.” Sir Harold Jeffreys Bayes’ Theorem concerns how to “update” the probability of a particular event given certain related events. This is a fancy way of saying, “What is the probability of event A happening given that event B has happened?” It is the fundamental theorem behind Bayesian Networks
3
Example There is a disease that is currently hitting the population for the first time. There is a 10% chance that any given person will have the disease. The medical community has developed a test which can detect the presence of the disease with 92% accuracy. Unfortunately, the test has a 5% chance of giving a false positive result to people who do not have the disease. Question: You just took the test and it returned as positive. What are the chances you actually have the disease?
4
Tree Time
5
The Math
6
So what? Given partial knowledge, one can make a “best guess” for a course of action or determine if a particular risk is worth the reward Could apply to pretty much any field where decision making and risk exists It can also be used for comparing relative strengths of probability, which is fundamental to the project I’m going to be doing
7
Bayesian Networks A Bayesian Network is a graphical probabilistic model used to show cause and effect of certain events in a closed system It requires two things: 1. Directed Acyclic Graph (DAG) 2. Conditional Probability Table (CPT) (There are usually multiple CPT’s for a single Network)
8
DAG Directed Acyclic Graphs are something we’ve been using in a few of our courses here (Discrete II, Data Structures, etc.) It’s just a graph where the edges have directionality (arrows rather than lines) and there are no cycles (ie: you can’t go around in circles). A binary tree is a DAG, for example
9
Nodes & Edges A node in a Bayesian Network concerns an event If one event affects another event (ie: helps determine another event’s outcome), the “affector” node will have a directed edge pointing to the “affectee” If you find a cycle in your graph (not a DAG), you need to introduce more nodes to explain the relationship
10
Example You’re away on vacation, preferably somewhere with no snow. You get a call from your neighbour saying that your house alarm is going off. You immediately fear a burglar is stealing your prized Lionel Ritchie music collection, and wonder if you should call the police. Here’s what you know: Your neighbour is getting old and has been known to hear things Every once and awhile, a big truck driving by will rattle your windows and set the alarm off If there is a burglar, they probably would set off the alarm and definitely steal your music collection (it’s Lionel Ritchie, after all)
11
Example DAG This is a fairly simple example of how the DAG could be drawn Events T and B directly affect event A, so A is said to be a “child” of T and B. T and B are parents of A. Event N is a “descendent” of T and B. T and B are “ancestors” of N.
12
CPT Conditional Probability Tables give a probability for each event depending on the outcome of the parent(s) event If an event has no parents, it is simply a P(true) and P(false) for the event Bayes Theorem is made easier when calculating the probability of an outcome over multiple events using these CPTs.
13
Parentless CPT’s These are very simple, just a straight probability since they are not dependent on anything Event T Probability True0.008 False0.992 Event B Probability True0.0001 False0.9999
14
Normal CPT Most events in a Bayesian Network have dependencies (parents), which means their probabilities are based on the occurrence or lack thereof of other events. For example, the chances the neighbour reporting the alarm vary greatly on the event of the alarm actually going off. Event A Event N Pr ( N | A ) True 0.72 TrueFalse0.28 FalseTrue0.01 False 0.99
15
Abbreviated CPT CPT’s do not need all their rows. The 1 st and 2 nd rows add to 1, as do the 3 rd and 4 th. As such, the table on the previous page can actually leave those out, and the person reading the table can deduce those values with subtraction, in order to make the network less cluttered. Event A Event N Pr ( N | A ) True 0.72 FalseTrue0.01
16
Multiple Parents Gets tricky when an event has multiple parents, since there is now more than one variable on which it is dependent. This tree below represents the possibilities of the dependent variables:
17
Create CPT TBAPr(A|T,B) True 0.9625 True False0.0375 TrueFalseTrue0.75 TrueFalse 0.25 FalseTrue 0.85 FalseTrueFalse0.15 False True0 False 1 With the additional dependency, the table gets much larger very quickly. This example uses the probability that a truck has a 0.75 chance of setting off the alarm, and a burglar has a 0.85 chance of setting off the alarm. Notice every pair of rows sums to 1. This means it can be abbreviated.
18
Create CPT TBAPr(A|T,B) True 0.9625 TrueFalseTrue0.75 FalseTrue 0.85 False True0 That’s much easier to fit on a diagram, and contains the same information (besides a couple subtractions that are easily done).
19
Now it’s ready! Once each node in the DAG has a conditional probability table assigned to it, the diagram is now a Bayesian Network Notice the 2 nd last column is always all “true”? It can also be condensed for the purpose of space
20
My Project The project I plan to create is an offshoot of work done by an engineering PhD student from the University of Toronto, named Samah El-Tantawy She designed and implemented a system using Computational Intelligence (hybrid) techniques which reduced congestion at certain busy intersections by up to 40%
21
My Project My system will be far less involved than Ms. El- Tantawy’s (hers was a much lauded masters’ thesis, not just an undergrad-level project) Mine will be much simpler, and will concern itself with a 3 x 3 grid of lights on a street Will count volume of cars and/or wait time of cars (still figuring out which is better) going through the intersections The intersections will then be modelled using Bayesian Networks
22
My Project Will likely use multiple networks which will need to be weighted against each other using another model (hopefully, nothing too complicated) The goal will be to try and reduce wait times for all vehicles This is an optimisation process with an element of probability involved (exact volume), so not easy to solve
23
My Project The project will have 3 phases: 1. Mapping intersections and creating Bayesian Networks 2. Observation of vehicles passing through and/or wait times at lights 3. Analysis & adjustment of stop lights based on calculations to reduce overall wait times Phases 2 and 3 will repeat several times to generate more optimal solution
24
Resources I’m using two books primarily for this project: 1. Probabilistic Graphical Models (Daphne Koller, Stanford) 2. Modeling and Reasoning with Bayesian Networks (Adnan Darwiche, UCLA) Adnan Darwiche is also the Editor-in-Chief for the Journal of Artificial Intelligence Research (www.jair.org), which contains a lot of articles related to AI / CI and is free to downloadwww.jair.org
25
Thank you This concludes my presentation. Thanks for listening.
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.