a general purpose nearest neighbour framework, an A.I. tool useful for machine learning and outcome estimation