Nearest Neighbor-based Importance Weighting