Automatic Selection of Frequency and Time Intervals for Classification of EEG Signals