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

[BUG] simulation data of target is not the same is sample #49

Closed talgalili closed 1 year ago

talgalili commented 1 year ago

This makes the comparison of happiness after weighting to be wrong. The purpose of having the outcome in the target population was to show how adjustment gets us closer there.

This: https://github.com/facebookresearch/balance/blob/main/balance/datasets/__init__.py#L62 Should be made to be like this: https://github.com/facebookresearch/balance/blob/main/balance/datasets/__init__.py#L89

After the change, the seed would change a bit - so tests would need to be fixed.