$$\require{enclose}\newcommand{\circletext}[1]{\enclose{circle}{\bbox[0.75ex]{\rm #1}}} \begin{array}{c} && \circletext{Influenza} &&&& \circletext{Smokes} \\ & \swarrow & \downarrow & \searrow & &\swarrow \\ \circletext{Sore\, throat} && \circletext{Fever} & & \circletext{Brochitis}\\ &&& \swarrow & & \searrow \\ && \circletext{Coughing}&&&&\circletext{Wheezing}\end{array}$$
Suppose I have a network defined as above. What would be the formula for calculating $\mathsf P(\text{Wheezing})$?
Do you mean calculate it from the root probabilities and branch conditionals?
Letting $W$ stand for "Wheezing", $B$ for "Bronchitis", $I$ for "Influenza", $S$ for "Smoker", et cetera.
$$\def\P{\operatorname{\mathsf P}} \P(W) ~{=~ \sum\limits_{b\in\{B,B^\complement\}} \P(W\mid b)\P(b) \\ =~\sum\limits_{b\in\{B,B^\complement\}} \P(W\mid b)\Big(\sum\limits_{i\in\{I,I^\complement\}}\underline{\phantom{ \P(i)}}\big(\sum\limits_{s\in\{S,S^\complement\}}\underline{\phantom{\P(s)\P(b\mid s, i)}}\big)\Big) }$$