An ensemble-driven k-NN approach to ill-posed classification problems