Understanding the nonlinear behavior of EEG with advanced machine learning in artifact elimination