An electronic apparatus for establishing prediction model based on electroencephalogram (EEG). The electronic apparatus is configured for: acquiring an EEG signal segment related to an epilepsy patient dividing each EEG signal into EEG components according to a predetermined window size retrieving datasets corresponding to EEG features from the EEG components of each EEG signal segment acquiring statistical feature values of each dataset of each EEG signal segment determining a gain ratio of each of the statistical feature values of each EEG signal segment based on the statistical feature values corresponding to each of the EEG features selecting specific statistical feature values from the statistical feature values according to the gain ratio of each of the statistical feature values of each EEG signal segment establishing a prediction model based on the specific statistical feature values of the epilepsy patient.