There is a bunch of ML/EEG devices on the market, it is a commodity technology by now, just google "fda machine learning eeg".