The present application belongs to the technical field of physiological electrical signals, and particularly relates to a method for adjusting
model parameters based on electroencephalogram signals and an
epilepsy treatment device. First, a
loss factor is obtained according to the
phase state of training data, that is, a missed
detection rate and a detection
delay time are obtained according to seizure period data, a
false alarm number is obtained according to inter-period data, and an alarm time is obtained according to pre-seizure data. Then, based on the
loss factor, candidate parameters are obtained. Finally, the parameters of the detection model are adjusted according to the candidate parameters. The
loss factor is combined with the
phase state of the data, and then the parameters of the model are trained. According to the detection requirements, the
phase state of the data sample and the adaptive detection model can be selected, so that the
model parameters and the data characteristics are more matched, and the weight of the sample category does not need to be considered.