An extended EM algorithm for subspace clustering