Molecular Machines and the EM algorithm