how_to_develop_a_bn
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
how_to_develop_a_bn [2018/12/18 16:29] – [4. Designing the network] stritiha | how_to_develop_a_bn [2023/04/21 15:30] (current) – external edit 127.0.0.1 | ||
---|---|---|---|
Line 11: | Line 11: | ||
Evidence can be data (e.g. when we know the type of land cover in a pixel) or scenarios (e.g. when we explore what happens in the system when we increase the harvesting rate). When we know the state of a node with 100% certainty, this is called **hard evidence** (the land cover is a forest), while **soft evidence** contains some uncertainty and is in the form of a probability distribution (the land cover is a forest with 70% probability and a grassland with 30% probability). | Evidence can be data (e.g. when we know the type of land cover in a pixel) or scenarios (e.g. when we explore what happens in the system when we increase the harvesting rate). When we know the state of a node with 100% certainty, this is called **hard evidence** (the land cover is a forest), while **soft evidence** contains some uncertainty and is in the form of a probability distribution (the land cover is a forest with 70% probability and a grassland with 30% probability). | ||
+ | {{: | ||
+ | //Example of a Bayesian Network that describes the ecosystem service of recreation. The CPT of node " | ||
==== 1. Model purpose and context ==== | ==== 1. Model purpose and context ==== | ||
Before the construction of the BN begins, it is important to clarify the problem and objectives, as well as the modelling context: | Before the construction of the BN begins, it is important to clarify the problem and objectives, as well as the modelling context: | ||
* What is the main question to be addressed with the model? What are the “target nodes” – the main variables of interest, e.g. the focal ecosystem services? | * What is the main question to be addressed with the model? What are the “target nodes” – the main variables of interest, e.g. the focal ecosystem services? | ||
* What are the key drivers that affect the focal ecosystems? | * What are the key drivers that affect the focal ecosystems? | ||
- | * How will the model be used? BNs can be used to improve system understanding, | + | * How will the model be used? BNs can be used to improve system understanding, |
* What is the appropriate spatial scale and extent to address the question? | * What is the appropriate spatial scale and extent to address the question? | ||
* Should the model be dynamic, i.e. take into account multiple time steps? If so, what is the appropriate temporal resolution? | * Should the model be dynamic, i.e. take into account multiple time steps? If so, what is the appropriate temporal resolution? | ||
Line 25: | Line 27: | ||
A free test version of Netica (with a limit of 15 nodes per network) can be downloaded at http:// | A free test version of Netica (with a limit of 15 nodes per network) can be downloaded at http:// | ||
- | However, many functionalities are also available in other software packages. For an overview, see review by Pérez-Miñana (2016). | + | However, many functionalities are also available in other software packages. For an overview, see review by [[https:// |
- | In order to map ES, we link BNs to spatial data using a specialized online application (gBay.ethz.ch) developed at ETH-PLUS within the framework of the ECOPOTENTIAL project. | ||
==== 3. Defining the nodes==== | ==== 3. Defining the nodes==== | ||
Line 40: | Line 42: | ||
The relevant variables in the system can be defined by experts, from literature, or through stakeholder workshops. | The relevant variables in the system can be defined by experts, from literature, or through stakeholder workshops. | ||
=== 3.1 With experts or stakeholders=== | === 3.1 With experts or stakeholders=== | ||
- | A good way to find a set of relevant influence factors is a workshop with experts or stakeholders. Before the workshop, a list of relevant factors can be compiled based on literature or expert interviews. At the workshop, the participants individually rank the importance of the individual factors. Then, the ranking is discussed to find a consensus about a set of most relevant influence factors (Celio et al. 2014). For more details on setting up a BN with experts or stakeholders, | + | A good way to find a set of relevant influence factors is a workshop with experts or stakeholders. Before the workshop, a list of relevant factors can be compiled based on literature or expert interviews. At the workshop, the participants individually rank the importance of the individual factors. Then, the ranking is discussed to find a consensus about a set of most relevant influence factors ([[https:// |
=== 3.2 Creating nodes in Netica=== | === 3.2 Creating nodes in Netica=== | ||
- | To create a node in Netica, click on the icon and then place the new node somewhere on the canvas. Double click on the node to open a window with the node properties, where you can change the node name and define it as discrete or continuous. | + | To create a node in [[https:// |
==== 4. Designing the network ==== | ==== 4. Designing the network ==== | ||
Line 59: | Line 61: | ||
=== 4.1 Defining links with stakeholders or experts === | === 4.1 Defining links with stakeholders or experts === | ||
- | One approach to define the causal links between nodes is using an influence matrix, where experts (or stakeholders) are presented with a matrix based on the list of nodes that they previously agreed on. Then, they are asked to assess the influence of each node on every other node in the network (Celio et al. 2014). This can be done in a workshop or via an (online) questionnaire. The influence matrix can be translated into causal links in the network, which should then be discussed with the experts. As a first step to construct a network, it is necessary, to construct the casualties of all driving factors. Because there is no natural scale for judging direct impact strength, the scale has to be determined, e.g. a 5-point-scale. A problem that might appear is the high amount of impacts. To deal with this phenomenon, the calculation of standard statistics (mean, median, variance) are helpful to show the degree of heterogeneity and to aggregate the experts impact estimations. Based on this a preliminary network can be constructed to be discussed with the experts. | + | One approach to define the causal links between nodes is using an influence matrix, where experts (or stakeholders) are presented with a matrix based on the list of nodes that they previously agreed on. Then, they are asked to assess the influence of each node on every other node in the network ([[https:// |
=== 4.2 Creating links in Netica === | === 4.2 Creating links in Netica === | ||
- | To create a link between two nodes in Netica, click on the arrow icon in the toolbar. Then click on the parent node and drag the arrow to its child node. | + | To create a link between two nodes in [[https:// |
==== 5. Defining the variable states ==== | ==== 5. Defining the variable states ==== | ||
Line 68: | Line 70: | ||
=== 5.1 Defining node states in Netica === | === 5.1 Defining node states in Netica === | ||
- | To modify the states of a node in Netica, double click on the node to open the node properties window. Click on “Description” and select “States”. Then, simply enter the names of the states in the box below. For continuous nodes, the states are defined through discretization intervals. Select “Discretization” and enter the threshold values between the states. | + | To modify the states of a node in [[https:// |
- | + | {{: | |
+ | |||
+ | // Defining states for discrete and continuous nodes in Netica.// | ||
==== 6. Filling the CPTs ==== | ==== 6. Filling the CPTs ==== | ||
The links between nodes in a BN are represented by conditional probability tables, where a probability distribution of a child node is defined for every combination of states of its parent nodes. Depending on the availability of data or models, various methods can be used to populate CPTs, from expert elicitation to “learning” from data. During this process, we may find it necessary to return to previous steps and redefine the nodes, their states, or the links between them. | The links between nodes in a BN are represented by conditional probability tables, where a probability distribution of a child node is defined for every combination of states of its parent nodes. Depending on the availability of data or models, various methods can be used to populate CPTs, from expert elicitation to “learning” from data. During this process, we may find it necessary to return to previous steps and redefine the nodes, their states, or the links between them. | ||
- | In Netica, the CPTs can be filled either manually (right click on the node -> Table) or through equations. To use an equation, open the node properties, select Equation, and enter the equation in the box. Then, click on to calculate the CPT based on the equation. | + | In [[https:// |
- | + | ||
+ | {{: | ||
+ | |||
+ | // Examples of a deterministic (left) and probabilistic (right) equation in Netica.// | ||
=== 6.1 With experts or stakeholders === | === 6.1 With experts or stakeholders === | ||
- | When data is lacking, the CPTs can be filled manually by experts or by stakeholders. Usually, this means that the experts should specify the probability of each state of the child node given each combination of parent nodes. When a node has many parents with several states, many rows of CPTs need to be filled, which can lead to fatigue and boredom, and it is difficult to ensure consistent distributions (Das 2004). This is why it is important to limit the number of parents, and the number of node states. | + | When data is lacking, the CPTs can be filled manually by experts or by stakeholders. Usually, this means that the experts should specify the probability of each state of the child node given each combination of parent nodes. When a node has many parents with several states, many rows of CPTs need to be filled, which can lead to fatigue and boredom, and it is difficult to ensure consistent distributions ([[https:// |
- | When node states are binary or ordered, this problem can be reduced by using various interpolation methods (Cain 2001, Das 2004). For example, if a child node C has three states (“low”, “medium”, | + | When node states are binary or ordered, this problem can be reduced by using various interpolation methods ([[http:// |
- | Distributions of continuous variables can also be elicited from experts. One useful approach is the four-point estimation method (Speirs-Bridge et al. 2010), where we ask experts for the expected value of the node for a specific combination of parents, the expected upper and lower bounds of possible values, and their confidence in their estimate. Using this information, | + | //Example of interpolation in a CPT, where the weights of the parents are w1 = 0.17, w2 = 0.5, w3 = 0.33. Elicited probabilities are shown in bold, while all other probabilities in the table are calculated using interpolation, |
+ | {{: | ||
+ | |||
+ | |||
+ | Distributions of continuous variables can also be elicited from experts. One useful approach is the four-point estimation method ([[https:// | ||
In some cases, experts find it easier to deal with categories rather than continuous variables, and it may be useful to translate continuous nodes to discrete classes using fuzzy logic. | In some cases, experts find it easier to deal with categories rather than continuous variables, and it may be useful to translate continuous nodes to discrete classes using fuzzy logic. | ||
Line 89: | Line 100: | ||
=== 6.2 Linking remote sensing proxies to the state of the ecosystem=== | === 6.2 Linking remote sensing proxies to the state of the ecosystem=== | ||
- | To map ecosystem services, proxies of ecosystem structure are often derived from remote sensing (e.g. land cover classifications or LiDAR-based measurements of vegetation cover). However, these remote sensing products often include some uncertainty due to measurement errors or misclassifications. | + | To map ecosystem services, proxies of ecosystem structure are often derived from remote sensing (e.g. land cover classifications or LiDAR-based measurements of vegetation cover). However, these remote sensing products often include some uncertainty due to measurement errors or misclassifications. |
=== 6.3 From existing empirical models=== | === 6.3 From existing empirical models=== | ||
Often, some parts of the network have already been extensively researched and empirical or process-based models are available in literature. In this case, the model can be incorporated in the BN in the form of probabilistic equations. This usually means that the probability distribution of the child node is a normal distribution, | Often, some parts of the network have already been extensively researched and empirical or process-based models are available in literature. In this case, the model can be incorporated in the BN in the form of probabilistic equations. This usually means that the probability distribution of the child node is a normal distribution, | ||
- | For an example of how an empirical model can be incorporated in a BN, see the avalanche protection case study. | + | For an example of how an empirical model can be incorporated in a BN, see the [[Avalanche protection in Davos, Switzerland|avalanche protection case study]]. |
=== 6.4 Learning from data or simulations === | === 6.4 Learning from data or simulations === | ||
Where sufficient data is available, CPTs can be “learned” directly from data within a BN software. Learning a CPT requires a dataset of cases with information on the child node and its parents. Various algorithms (e.g. Expectation Maximisation or gradient descent) can be used to find the maximum likelihood BN, which is the network that is most likely given the data. This approach can also be used to translate process-based simulation models into the BN. We run the simulation over the range of input values, and use the results as cases for learning the BN. Parameters that are not included in the network should also be varied in the simulation, in order to capture the uncertainty in the model. | Where sufficient data is available, CPTs can be “learned” directly from data within a BN software. Learning a CPT requires a dataset of cases with information on the child node and its parents. Various algorithms (e.g. Expectation Maximisation or gradient descent) can be used to find the maximum likelihood BN, which is the network that is most likely given the data. This approach can also be used to translate process-based simulation models into the BN. We run the simulation over the range of input values, and use the results as cases for learning the BN. Parameters that are not included in the network should also be varied in the simulation, in order to capture the uncertainty in the model. | ||
- | To “learn” from data in Netica, create a text file where the column names match the names of the nodes in the network, and rows represent cases (i.e. observations, | + | To “learn” from data in [[https:// |
- | Learning from simulations was used to populate one of the nodes in the avalanche protection network, while in-situ data were used to quantify some nodes in the BN of ecosystem services in the Wadden Sea. | + | Learning from simulations was used to populate one of the nodes in the [[Avalanche protection in Davos, Switzerland|avalanche protection network]], while in-situ data were used to quantify some nodes in the BN of ecosystem services in the Wadden Sea. |
==== 7. Testing, evaluating, and updating the BN ==== | ==== 7. Testing, evaluating, and updating the BN ==== | ||
Line 109: | Line 120: | ||
Sensitivity analysis is a useful tool that determines the influence of individual variables on the outputs, which can help us decide where more data is necessary. When new data becomes available, it can be used to update the conditional probability distributions in an iterative process. | Sensitivity analysis is a useful tool that determines the influence of individual variables on the outputs, which can help us decide where more data is necessary. When new data becomes available, it can be used to update the conditional probability distributions in an iterative process. | ||
- | In Bayesian Network modelling, sensitivity analysis is often used to evaluate the influence of variables in the modelled system on the posterior probability distribution of a node of interest (Uusitalo 2007, Marcot 2012). Sensitivity to findings can be measured by the reduction in uncertainty (e.g. entropy or variance) in the target node due to a finding on another node. Entropy reduction is expressed by the measure of mutual information (Kjaerulff and Madsen 2013): | + | In Bayesian Network modelling, sensitivity analysis is often used to evaluate the influence of variables in the modelled system on the posterior probability distribution of a node of interest ([[https:// |
$ I(X,Y) = H(X) - H(X|Y) = H(Y) - H(X|Y)= ∑_Y P(Y)∑_X P(Y)(P(X, | $ I(X,Y) = H(X) - H(X|Y) = H(Y) - H(X|Y)= ∑_Y P(Y)∑_X P(Y)(P(X, | ||
Line 117: | Line 128: | ||
The analysis of sensitivity to findings gives us an indication of which variables in the system have the highest influence on the outcome of the model. | The analysis of sensitivity to findings gives us an indication of which variables in the system have the highest influence on the outcome of the model. | ||
- | To perform sensitivity analysis in Netica, select the node whose sensitivity you want to measure. Then, go to Network -> Sensitivity to findings, and you will get a table showing the sensitivity metrics (mutual information, | + | To perform sensitivity analysis in [[https:// |
Sensitivity analysis can be used to map the flow of information in a Bayesian Network and analyse uncertainties. | Sensitivity analysis can be used to map the flow of information in a Bayesian Network and analyse uncertainties. | ||
=== 7.2 Scenario testing with experts or stakeholders === | === 7.2 Scenario testing with experts or stakeholders === | ||
- | When co-constructing a BN with experts or stakeholders, | + | When co-constructing a BN with experts or stakeholders, |
how_to_develop_a_bn.1545146949.txt.gz · Last modified: 2023/04/21 15:30 (external edit)