Sparse Modeling in Classification, Compression and Detection