Nearest Neighbor Matching as Least Squares Density Ratio Estimation and Riesz Regression