T wave alternans (TWA) has been associated with ventricular arrhythmias. Hence, TWA detection can risk stratify patients with heart disease who may experience sudden death from ventricular arhythmias. However, accurate TWA detection is technically challenging due to the low microvolt TWA signal and the confounding effect of biological noise such as movement, myopotentials or respiration. In this paper, we propose nonnegative matrix factorization (NMF)-Adaptive spectral method to increase the robustness of TWA detection in ambulatory electrocardiograms (ECGs). The proposed method applies a non-linear time-frequency (TF) analysis and NMF to the aligned ST-T waveforms. This method separates the TWA signal from the other non-desired ECG signal components, and detects TWA with high accuracy. The performance of our proposed method is validated in a clinical study using ECGs which confirms a TWA detection of 92% compared to 47% using the conventional spectral method.