add get_config method in nearest_neighbor (fix #440)