facebookresearch / balance

The balance python package offers a simple workflow and methods for dealing with biased data samples when looking to infer from them to some target population of interest.
https://import-balance.org
GNU General Public License v2.0
681 stars 40 forks source link

[FEATURE] export the propensity score model for predicting new weights #81

Open talgalili opened 3 months ago

talgalili commented 3 months ago

Currently running the model on many millions of observations is computationally costly. A better solution would be to run the model a sample of observations (E.g., 10K-50K observations for sample and target). And then export the model, and use it to predict the weights of other observations.

This should probably be done only after issue #30 is resolved.

talgalili commented 3 months ago

As a temporary hack: One option is to use balance to fit weights to a sample (with, say, 20K users). And then use another model (say, XGboost/RandomForest, or something else) on this sample to predict (based on the same covariates), what the weights are. With that model, you could then predict the weights to all of your users.