A mixture model for dimension reduction