The present invention relates to the design and implementation of a seizure detection or prediction system. The proposed invention computes and selects spectral power ratio features, cross-channel spectral power ratio features, cross spectral power features and cross spectral power ratio features in a patient-specific manner. The selected features are input to a classifier to detect or predict seizures. The proposed algorithm takes advantage of high sensitivity in detecting or predicting seizures and low complexity in implementation. The proposed scheme is general and is suitable for creating a trigger for therapy delivery in a closed-loop therapy system. The therapy could involve either delivery of an anti-epileptic drug or electrical or magnetic stimulation of the brain.