Scale-invariant Optimal Sampling for Rare-events Data with Sparse Models