Skip to content

Commit

Permalink
Remove instructions for testing and whynot_estimators install
Browse files Browse the repository at this point in the history
  • Loading branch information
bradyneal committed Mar 25, 2021
1 parent c1f7561 commit d2126b8
Showing 1 changed file with 0 additions and 26 deletions.
26 changes: 0 additions & 26 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,32 +27,6 @@ If step 1 above fails, try the following instead: `conda env create -f environme
└── utils.py - various utility functions
```

## Testing
This project uses [pytest](https://docs.pytest.org/en/latest/). Before you push code, it is generally a good idea to run `pytest` to make sure it hasn't broken anything that is covered by the existing tests, especially if you are pushing a big commit. You can run `pytest -v` for a bit more verbose output. This will just run fast tests that only take a few seconds. You can run the slow tests that involve fully training models by including the `--runslow` flag. You can run the plotting tests by including the `--runplot` flag.

## Installing whynot_estimators
The regular `whynot` package comes with [3 simple estimators](https://github.com/zykls/whynot/blob/master/whynot/algorithms/causal_suite.py#L47): OLS, propensity score matching, and propensity score weighted OLS. These may be sufficient for your purposes. If not, read further.

To use more, you must install them in the `whynot_estimators` package. The `whynot_estimators` package should already have been pip installed from environment.yml. To use the additional 4 estimators [here](https://github.com/zykls/whynot/blob/master/whynot/algorithms/causal_suite.py#L53), you must install them as follows:
```
python -m whynot_estimators install ip_weighting
python -m whynot_estimators install matching
python -m whynot_estimators install causal_forest
python -m whynot_estimators install tmle
```

Depending on your operating system, you may have issues with these installs because conda doesn't always play well with r.

For example, on MacOS, I had trouble installing the `Matching` R package and the `dbarts` R package that is used in the `tmle` R package. I just followed [this answer StackOverflow answer](https://stackoverflow.com/a/55875539) and ran the following r code inside the `gen` conda env to fix the issue:

```r
(gen) $ r
> Sys.setenv(CONDA_BUILD_SYSROOT="/")
> install.packages("Matching")
> install.packages("tmle")
> install.packages("dbarts")
```


## Loading RealCause pre-computed datasets

Expand Down

0 comments on commit d2126b8

Please sign in to comment.