# There are two general approaches to

There are two general approaches to building Bayesian networks for the purpose of risk assessment. Researchers can implement static models that predict risk or survival at a snap-shot of time. For example, Loghmanpour et al. [10] created Bayesian network-based risk assessment models for patient data with the left ventricular assist devices (LVADs). Bayesian networks may estimate the risk at specific points in time, e.g., 30 days, 90 days, 6 months, 1 year, or 2 years, with high accuracy, outperforming traditional risk scores methods. A more complex approach uses dynamic Bayesian networks (DBNs) [11]. Van Gerven et al. [12] implemented a DBN for prognosis of patients who suffer from low-grade midgut carcinoid tumor. Instead of analyzing each time point separately, the DBN model calculates how the state of a patient changes over time under the influence of various therapy choices. This allows for modeling temporal nature of medical problems throughout the course of care and provides detailed prognostic predictions. However, it requires significantly more effort during model construction, i.e., require expertise to define the causal structure and temporal interactions, large amount of data, and is generally time-consuming [12].

Bayesian network interpretation of the CPH model
As we mentioned earlier, the process of building Bayesian networks can take a significant effort, especially when little or no data are available. In this section, we discuss how to use parameters from existing CPH models to create Bayesian networks. This approach is especially useful when very little or no data are available. We assume that the CPH model\'s assumptions are not violated and the risk factors or random variables X are time-independent discrete/binary variables [13].
To create a Bayesian network, first we create its structure by designating the random variables representing risk factors as parents (X) of the survival DHEA (S). The number of states of each random variable is the same as in the CPH model.
Unlike the CPH model, static Bayesian networks capture a snapshot of a system at a certain time. We need, thus, to represent time explicitly. We achieve this by adding an indexing variable (T) for time, capturing each discrete point in time that is of interest, e.g., every day, every two weeks, etc. This time variable can be omitted if we are interested in the prediction at one point in time, e.g., at one year. Fig. 2 shows an example of such a model (we will call it the BN-Cox model), showing the relationship between risk factors (X), the time variable (T), and the survival node (S).
In the next step, we create the conditional probability table for the survival node (S). Recall that we can obtain the survival probabilities from Equation (7) in the CPH model. For each time snapshot captured by the variable T, we assess a set of survival probabilities, from the CPH model. A set of survival probabilities here means that we configure the hazard ratio γ according to the combination of the parent states. γ is equal to hazard ratio of the conditioning case to the baseline case , i.e., case in which all risk variables are absent, i.e., Equation (10) allows us to assess the survival probabilities directly from the parameters of the CPH model. First, we configure all risk factor cases in Equation (10) to find all hazard ratio values. Then we obtain the baseline survival probability at the first point in time from the CPH model () and use Equation (7) (or Equation (8)) to find the survival probability. The survival probability calculated for each combination of risk factors corresponds to the conditional probability of survival. Hence, the conditional probability to be encoded in the CPT can be estimated by where s corresponds to the state survived in the survival node S, X are risk factors, and T is the time point. This allowed us to reproduce fully the CPH model by means of a Bayesian network.