Functions to fit mixtures of regressions.