Add tests for pearson coefficent, refactor nearest neighbor to use any compare function