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] Fix missing scatterplot in CBPS in Python vs R tutorial #82

Open talgalili opened 3 months ago

talgalili commented 3 months ago

In this tutorial: https://import-balance.org/docs/tutorials/comparing_cbps_in_r_vs_python_using_sim_data/

We have variations of the following line commented out: adjust.df.plot.scatter("cbps_weights", "weight", loglog=True) (there are two calls for adjust.df.plot.scatter)

It's commented out because otherwise it leads to an error in github pages See: https://github.com/facebookresearch/balance/commit/bc6d4e3063c0bc5ee904773df9dc5c14d512bae8?fbclid=IwAR0rz8HfVzsrjtI3u-lLswQGVdGj4J5r-np4Nj9B2g0nNIoP-MlcUKp5TuU

It was fixed by removing the figures, done here: https://github.com/facebookresearch/balance/commit/90300b2484998dedc6a946011959312e07b9226a

It would be nice to find a way to bring the plots back.

Without raising also:

/home/runner/.local/lib/python3.10/site-packages/pandas/plotting/_matplotlib/core.py:1114: UserWarning:

No data for colormapping provided via 'c'. Parameters 'cmap' will be ignored