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
686 stars 42 forks source link

[FEATURE] Migrate from glmnet_python to sklearn #30

Open SarigT opened 1 year ago

SarigT commented 1 year ago

Currently the usage of glmnet_python in ipw fuction is a blocker to:

  1. Using ipw on Windows (due to installation of glment_pyton) (issue: https://github.com/facebookresearch/balance/issues/26)
  2. Migrating the license from GPL2 to MIT (issue: https://github.com/facebookresearch/balance/issues/16)
  3. Shorter installation (no need to install glmnet)
  4. Compatibility with Scipy 1.9.0+ (issue: https://github.com/bbalasub1/glmnet_python/issues/64)

Current plan is to move from glmnet_python to sklearn during Jan 2025. This issue is to follow on progress.

talgalili commented 1 year ago

Two updates:

  1. the current glmnet library seems to not work with Python 3.11. Hence, moving to sklearn will be required in order to keep balance forward compatible with newer versions of python.
  2. Moving to sklearn would enable to to have the ipw also store the model itself, giving the user the ability to use it to predict values for users outside of the sample.
  3. sklearn would also let us move to other models (E.g.: random forest etc.), letting us move beyond glm based LASSO models only.
talgalili commented 1 year ago

UPDATE: This issue is not planned to be addressed during 2023. We'll revisit it in 2024, and hopefully address it then.