NSAPH-Projects / space

SpaCE, the Spatial Confounding Environment, loads benchmark datasets for causal inference methods tackling spatial confounding
https://nsaph-projects.github.io/space/
MIT License
14 stars 5 forks source link

Writing more code on evaluator notebook #69

Closed sophi890 closed 1 year ago

sophi890 commented 1 year ago

@mauriciogtec See branch sophi890/issue69

The 3 most recent commits did the following:

  1. Added ipykernel, pytorch, multiprocess to requirements.yaml and requirements.txt. Didn't know what versions to put so just put most recent versions.
  2. Created the python file cfs_erf_spatial in examples (where should this go) which contains the function that the notebook from 4. uses in the parallelization.
  3. Update spatial and spatial+ with different df and deg and different minimization methods.
  4. Created the notebook election_spatial in examples that runs spatial and spatial plus on every dataset in the election environment using parallelization via Pool from multiprocess

TODO: save the results intermittently

sophi890 commented 1 year ago

Updated cfs_erf_spatial.py so that results are saved when each dataset is finished, in output.csv. Updated notebook as well. Note that original order of datasets in env.make all is not necessarily preserved. This is because imap issues tasks one-by-one and processing the results for tasks in order as they are available. But I can change this if you think preserving order might be important.