We propose a novel transform called Lehmer transform and establish theoretical results which are used to compress and characterize large volumes of highly volatile time series data. It will be shown that our proposed method could be used as a practical data-driven approach for analyzing extreme events in nonstationary and highly oscillatory stochastic processes such as biological signals. We demonstrate the advantage of the proposed transform in comparison with traditional methods such as Fourier and Wavelets transforms through an example of devising a classifier to discern the patients with major depressive disorder from the healthy subjects using their recorded EEG signals and provide the computational results. We show that the proposed transform can be used for building better and more robust classifiers with significant accuracy.