On weighted local fitting and its relation to the Horvitz-Thompson estimator