Adaptive structure neural networks with applications to EEG automatic seizure detection