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.
Not sure yet if it's better to raise an error, or a warning (and impute it with 0s). But let's go with error.
But at least it's worth giving a printout of userid with the None weights (or at least "head" of it, maybe with some of their features also)
Not sure yet if it's better to raise an error, or a warning (and impute it with 0s). But let's go with error. But at least it's worth giving a printout of userid with the None weights (or at least "head" of it, maybe with some of their features also)
A good place to do this is by adding the check here: https://github.com/facebookresearch/balance/blob/main/balance/sample_class.py#L268
And add tests that verify it works here: https://github.com/facebookresearch/balance/blob/main/tests/test_sample.py