sentence: Bayesian networks are a very general tool that can be used for a large number of problems : reasoning ( using the Bayesian inference algorithm ) , learning ( using the expectation-maximization algorithm ) , planning ( using decision networks ) and perception ( using dynamic Bayesian networks ) .