// count states:
int nstates = IntSequence.util.max(initialPaths)+1;
// construct em:
IExpectationMaximization em = new EM(_obs, eventBased, nstates, reversible, outputModel, outputEstimator, saveMemory);
// default parameters:
IHMMParameters par0 = parameters(nstates, reversible, true, outputModel);
em.setInitialParameters(par0);
em.setInitialPaths(initialPaths);
return em;
}