K-Nearest Neighbors regression for the discrimination of gamma rays and neutrons in organic scintillators