add threshold on dictionary learning