Using sparse matrices for features