Rare category exploration via wavelet analysis: Theory and applications