almost-matching-exactly / DAME-FLAME-Python-Package

A Python Package providing two algorithms, DAME and FLAME, for fast and interpretable treatment-control matches of categorical data
https://almost-matching-exactly.github.io/DAME-FLAME-Python-Package/
MIT License
56 stars 14 forks source link

Off by one #60

Closed nehargupta closed 1 year ago

nehargupta commented 1 year ago

Per @vittorioorlandi

  1. Fixed the definition of early stopping with respect to PE frac. Previously it was comparing to the previous iteration PE when it should be comparing to the PE at baseline. Accordingly, the PE at the 0'th iteration is always the PE using all covariates — even if we make no exact matches.

  2. Have everything starting at 0, with a completed iteration corresponding to successfully attempting matching. Updated defaults for pre_dame and early_stop_iterations; they are now float(‘inf’). This makes sense if they are supposed to be the number of iterations before something happens; if they are infinite they never happen (ie never early stop because of iteration and never switch to dame).

  3. Updated some notebooks to reflect the above.

  4. Eliminated the database folder and corresponding test folder for it -- this is temporary to get it up on PyPi with all the recent updates but will be put back shortly.

This takes care of https://github.com/almost-matching-exactly/DAME-FLAME-Python-Package/issues/47 and https://github.com/almost-matching-exactly/DAME-FLAME-Python-Package/issues/48 without breaking https://github.com/almost-matching-exactly/DAME-FLAME-Python-Package/issues/32 or https://github.com/almost-matching-exactly/DAME-FLAME-Python-Package/pull/33

nehargupta commented 1 year ago

Also @vittorioorlandi updates documentation webpage to reflect these changes.