Uncertainty relations and fluctuation theorems for Bayes nets