**Recent Clients**

**Bayesian Networks**

**Learning Bayesian Network Parameters**

Given a qualitative Bayesian network structure, the conditional probability tables, *P(x _{i}|pa_{i})*, are typically estimated with the maximum likelihood approach from the observed frequencies in the dataset associated with the network.

In pure Bayesian approaches, Bayesian networks are designed from expert knowledge and include hyperparameter nodes. Data (usually scarce) is used as pieces of evidence for incrementally updating the distributions of the hyperparameters (Bayesian Updating).

**Learning Bayesian Network Structure**

It is also possible to machine learn the structure of a Bayesian network, and two families of methods are available for that purpose. The first one, using constraint-based algorithms, is based on the probabilistic semantic of Bayesian networks. Links are added or deleted according to the results of statistical tests, which identify marginal and conditional independencies. The second approach, using score-based algorithms, is based on a metric that measures the quality of candidate networks with respect to the observed data. This metric trades off network complexity against the degree of fit to the data, which is typically expressed as the likelihood of the data given the network.

As a substrate for learning, Bayesian networks have the advantage that it is relatively easy to encode prior knowledge in network form, either by fixing portions of the structure, forbidding relations, or by using prior distributions over the network parameters. Such prior knowledge can allow a system to learn accurate models from much fewer data than are required for clean sheet approaches.

**Causal Discovery**

One of the most exciting prospects in recent years has been the possibility of using Bayesian networks to discover causal structures in raw statistical data—a task previously considered impossible without controlled experiments. Consider, for example, the following intransitive pattern of dependencies among three events: *A* and *B* are dependent, *B* and *C* are dependent, yet *A* and *C* are independent. If you asked a person to supply an example of three such events, the example would invariably portray *A* and *C* as two independent causes and *B* as their common effect, namely *A → B ← C*. For instance, *A* and *C* could be the outcomes of two fair coins, and *B* represents a bell that rings whenever either coin comes up heads.

Fitting this dependence pattern with a scenario in which *B* is the cause and *A* and *C* are the effects is mathematically feasible but very unnatural, because it must entail fine tuning of the probabilities involved. The desired dependence pattern will be destroyed as soon as the probabilities undergo a slight change.

Such thought experiments tell us that certain patterns of dependency, which are totally void of temporal information, are conceptually characteristic of certain causal directionalities and not others. When put together systematically, such patterns can be used to infer causal structures from raw data and to guarantee that any alternative structure compatible with the data must be less stable than the one(s) inferred; namely slight fluctuations in parameters will render that structure incompatible with the data.

**Caveat**

Despite recent advances, causal discovery is an area of active research, with countless questions remaining unresolved. Thus, no generally accepted causal discovery algorithms are currently available for applied researchers. As a result, all causal networks presented in this book are constructed from expert knowledge, or machine-learned and then validated as causal by experts. The assumptions necessary for a causal interpretation of a Bayesian network will be discussed in Chapter 1.