Epilepsy is a complicated neurological disorder that causes rapid and frequent seizures in both adults and children. EEG signals are emerging as non-invasive methods for analyzing epilepsy. However, processing and analyzing large volumes of EEG data requires significant time and expertise from neurophysiologists. This research presents a novel method to effectively differentiate between focal EEG and non-focal EEG data using the DAGSVM classifier. The suggested method utilizes the Bern Barcelona dataset and applies the Discrete Fourier Transform to EEG signals to identify time-frequency characteristics. We use 7,000 EEG signals, with 700 for testing and 6,800 for training. Results suggest that the DAGSVM classifier significantly exceeds existing approaches, achieving an accuracy of 99.71%. High accuracy improves patient results by facilitating the early diagnosis and care of epilepsy.