move the filtering process from ml to preprocessing
change the output filter