Learning to Classify Galaxy Shapes Using the EM Algorithm