Gyrotrons are vacuum electronic devices capable of generating high-power, high-frequency THz radiation. With the increasing utilization of gyrotrons in thermonuclear fusion experimental devices, achieving higher output performance and ensuring stable and reliable operation have become key development goals. However, occasional radio frequency (RF) oscillation faults inside the gyrotron during long-pulse operation hinder its stable and reliable operation. Due to the difficulty in directly observing abnormal changes within the gyrotron resonator during operation, this paper explores a data-driven approach to diagnose RF oscillation faults in the gyrotron for the first time and proposes a classification model that combines K-Nearest Neighbors and Random Forest (KNN-RForest) algorithms for fault identification. Compared with seven baseline models, the results show that our proposed KNN-RForest model has a better classification performance. It is verified that data-driven methods can effectively identify RF oscillation faults in gyrotrons. Finally, the state probabilities of the gyrotron under different power levels were predicted using the KNN-RForest model, demonstrating the application of the KNN-RForest model in identifying gyrotron RF oscillation faults, which may be helpful for setting stable operating parameters for the gyrotron to reduce the likelihood of RF oscillation faults.