Removing bad stretches and artifacts in EEG Signal

A post was split to a new topic: Is there any way to perform feature extraction and logistic regression after removing bad stretches without the use of events and epochs?