Automating pulse shape discrimination in organic scintillation detectors by understanding underlying data structure