New algorithms for clusterwise linear regression