simplified sparse matrix to single class