ALGEBRAIC CAUSALITY: BAYES NETS AND BEYOND