Simultaneous dimensionality reduction and dictionary learning for sparse representation based classification