The task is to build a Bayesian Decision Network (Influence Diagram) for a selected or individually developed problem, using one of the available tools supporting this model.
The steps necessary to complete the assignment:
Find a topic that can be described with a belief network, and for which you can acquire all the necessary probabilities. For the latter steps it will also be necessary to consider some simple decisions (one decision node is sufficient), and utilities of the situations described by the model.
Note:
Data must be real. Invented data can be used only in very simple examples, and usually do not make any interesting analysis.
For this reason, usually a good topic for this assignment would be one, to which we can find the data, ie a set of probabilities (prior and conditional).
Good sources are tables of statistical data with samples of some phenomenon, that give attribute values for multiple instances of this phenomenon. Such table typically do not contain any probabilities, but it is possible to calculate both the prior probability distributions of all the attributes treated as random variables, as well as the conditional probability distributions of any attribute, with respect to any group of other attributes. For this purpose the table must have a lot of data (rows, or instances).
In general, the data you are expected to use should be a true statistic for some phenomenon. We need to believe that the network model we build, correctly describes a random individual from the set, on which data is constructed.
Especially, beware the sets which look suspiciously regular, like:
case_nr attrib_1 attrib_2 attrib_3 1 true low low 2 true low medium 3 true low high 4 true medium low 5 true medium medium 6 true medium high 7 true high low 8 true high medium 9 true high high 10 false low low ...
Such data are not statistical and probabilities cannot be computed from them.
The problem should be well understood, at least in large part. When using the data found on the Internet, such as: medical, sociological, demographic, meteorological, etc., it is essential to understand the relationship between the attributes. Building a probabilistic belief network is precisely that - to record the correct causal links between the attributes. Sometimes the problem of unknown attributes can be solved by omitting them from the dataset, and using only those easily understood by anyone.
The key question is: What does a data record represent?
You have to know and understand the answer to this question. And it should
be clearly written in the report.
For purposes of this assignment, the network should not be too large. Fifteen or more nodes can be a good model of the phenomenon, and allow for an extensive investigation, but will be difficult to accurately calculate and verify all probabilities, as well as the correctness of the model, in full detail. For this assignment, the network should have 5-10 random variables.
NOTE: The size and complexity of the network must correspond to the size of the data set. For example, if the network has four random variables, one of which is dependent on the other three, and each of these variables has six values, the definition of the dependent variable will contain almost 1,300 conditional probabilities (separate cases), which have to be calculated from the available data. In other words, the data set will be split into 1300 subsets, each of which must be used to calculate a single conditional probability. If the original set contains less than 2,600, data records this will be impossible. But even if it contained 10,000 records, a calculation of probabilities, even if possible, does not make much sense. How to deal with this problem? Build a smaller and/or less complex network. Fewer variables, fewer dependencies between them, smaller sets of values. If in the above network the variables had only two values, the dataset with 1,300 records would be adequate to calculate the required probabilities.
(It is always possible that for some cases of conditional probabilities there will be zero samples, or even one or two, which still does not allow to effectively calculate any probability. However, such cases correspond to the extremely rare or impossible events, and if only the program can cope with building and operation of the network, then it will not affect the correctness of the answers for normal cases.)
Dependent random variables and conditional probabilities can be very counterintuitive, and confusing in the analysis. Building a belief network we must very precisely define its random variables. It is essential to give them names that reflect their meaning. (In the long descriptive names, you can use abbreviations, but do not omit important elements of the definition.)
For example, data for an average person is totally different statistics from the data for an average patient. The air temperature will be a different random variable if we compute it for the average day of a year, different if for the average day of a month, and different still, if we apply it to a statistical phenomenon, described by the available data (eg. statistical forest fire).
You must first precisely define the random variables according to the assumed model of the phenomenon, and only then calculate their probability distributions. This allows you to detect errors in the logical structure of the model, or its incompatibility with existing data. A common mistake for beginners is to confuse the probability with a random variable.
Sometimes, when completing the subsequent steps of this project becomes problematic, it may be a good idea to try a different dataset. Having tried to build a network from one dataset it is usually much easier to repeat this exercise with different data, and these data might be better, easier to understand and work with.
For the selected phenomenon, build a belief network model, and calculate or acquire all necessary probabilities. Enter data into the selected program, and then carefully verify the model by querying it about the probability distribution of the independent variables, and the expected values of the dependent variables. If the responses received are proper probabilities consistent with expectations, then perhaps the network is properly constructed. This step is similar to debugging a program by running it on some simple data, before using it on some really difficult cases.
NOTE: at this point we want to verify and confirm out assumptions about the dependencies between the random variables of the phenomenon. Belief networks should contain connections between variables that depend on each other directly. Working with a poorly understood phenomenon, it is possible that these relationships were not properly defined. The only way to determine this is to build alternative networks, and compare which one behaves most correctly. For this purpose you can use a tool which automatically builds a belief network form raw data (see links below).
Then, having verified the model, practice with it, posing queries for which answers are difficult to predict based on the data alone. Typically, questions that give interesting results are diagnostic queries, when we know the values of output variables, and we ask about the probability distributions of causal variables, and compare them with their prior distributions. A good result would be a query giving some very surprising, or inconsistent with the intuition, results (provided that they are correct, and not due to errors in the model construction).
Sometimes interesting question are also causal queries, when we assume knowledge of some combination of causal variables, and inquire about the distribution (expected value), of output variables.
If you have not come across any surprising results, the correct result of the assignment may also be the results entirely consistent with and confirming our intuitions. However, you should look for results that are not immediately apparent in the input data.
In the report describe how setting specific evidence change the probability distribution of some variable.
The next task is to use the probabilities obtained from the belief network to make decisions. Define some simple action or decision of the agent, made in connection to the situations described by the belief network. Define the utility function for the resulting states (combination of random variables' values and agent action values). Compute the expected utility of the situations resulting from the current information. Then determine the optimal action for the agent.
Note: while the random variables and probability data should come from some real experimental study, the decision and utility you will add to create the decision network should be your own idea and reflect your beliefs.
Think of it as what you could do with an individual from the set, or if it is a person, what you could advise to the individual. For example, buy it or not buy, go and visit a place, or not, decide to go the university, or not, start a treatment for some disease or not, write a story about it or not (suppose this it a statistics of bank robberies), etc.
In your decision network there should be a single decision node and a single utility node. The utility node should be labeled Utility, but you need to define it precisely whose utility it describes. For example, if the statistic is about patients and diseases, and the decision is whether to go ahead with the treatment or not, the utility might be from the point of view of the patient, the doctor, the hospital, the insurance provider, the medical company that produces the drugs, etc. In each of those cases the utility distribution could be defined differently.
In the decision network there should always be a link from the decision node to the utility node. Additionally, there should be some links from some random variables (at least from one) to the utility node. But do not make too many links into the utility node, because this will result in a rather complex utility distribution, which is hard to determine and justify.
Choose a chance node or nodes in your network, whose value could be acquired in some way (or at least you wished it could be acquired), and which can be expected to be helpful in making the decision. Search for cases when it is profitable to acquire the information, and when it is not. Compute the value of perfect information (VPI) for such variable/variables.
Note: a variable which directly influences the utility obviously should have a large value of information. Try identifying a different variable which is further "away" from the utility node and still has a relatively large VPI.
Note2: Some belief network building tools have a way to compute "value of information" which may be the same concept as the VPI, or may be something different. In order to understand it, try computing the "value of information" using the program, and them manually compute the VPI to verify it.
Belief and Decision Network Tool http://aispace.org/bayes/
Part of a suite of educational demo programs illustrating Artificial
Intelligence methods and algorithms. Available as network applet as well
as a standalone Java program.
Warning: this demo applet does not have the full functionality for building Bayesian belief and decision networks. You can use this tool to get going quickly, but refer to more comprehensive documentation to learn about Bayesian modeling and decision making.
D-trail applet http://b-course.cs.helsinki.fi/obc/depend.html
Demo applet available from the Helsinki Institute for Information Technology
has the capability of learning the best model for the given data set (as
well as some demo data sets provided).
It is not a fully featured Bayesian networks modelling tool.
HuginLite http://www.hugin.com/
A full featured commercial application available in a demo version for
Windows, Linux and Mac OSX.
resources: cases, tutorial, documentation, publications:
http://www.hugin.com/index.php/resources
GeNIe http://www.bayesfusion.com/downloads-rxu9q
A program developed at the University of Pittsburgh and now available
commercially from the company BayesFusion. Academic version is available
for Windows but runs on Linux and Mac OSX with Wine.
resources: model repository, documentation, list of publications and books:
http://www.bayesfusion.com/resources
Norsys Netica http://www.norsys.com/netica.html
Netica is a Windows-only commercial application which can be used as a demo
to build limited size models.
It runs on Linux using Wine and on Mac OSX using CrossOver Mac.
Matlab+BNT https://github.com/bayesnet/bnt
BNT is a opensource Matlab toolbox for programming graphical models such as
Bayesian Belief Network and Decision Networks, and has structure learning
and parameter learning capabilities. BNT was written by Kevin Murphy.
documentation:
https://www.cs.ubc.ca/~murphyk/Software/BNT/usage_02nov13.html
Software Packages for Graphical Models https://www.cs.ubc.ca/~murphyk/Software/bnsoft.html
A list of more popular software programs/applets and such for creating
graphical models such as the Bayesian Belief Networks.
The list was written by Kevin Murphy, last update 2014.