Skip to content

Commit

Permalink
readme update with updated instructions with python virtualenv setup
Browse files Browse the repository at this point in the history
  • Loading branch information
pranjaldhole committed May 14, 2024
1 parent 9e3529a commit 6f70e21
Showing 1 changed file with 21 additions and 11 deletions.
32 changes: 21 additions & 11 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,40 +10,50 @@ Library to conduct experiements on population dynamics.

## Installation

1. To generate required log and results directories, run
- To generate required log and results directories, run

```(bash)
bash init.sh
```

2. Create conda environment
- Create virtual environment
```bash
mkdir -p ~/venvs/population-dynamics
python3 -m venv ~/venvs/population-dynamics
```

```(bash)
conda env create -f environment.yml
- Activate virtual environment
```bash
source ~/venvs/population-dynamics/bin/activate
```

3. Activate the environment
- Upgrade pip and setuptools
```bash
pip install --upgrade pip setuptools
```

```(bash)
conda activate population-dynamics
- install dependencies with
```bash
pip install -r requirements.txt
```
```
4. Install `causal` as a package within the environment
- Install `causal_inference` as a package within the environment
```(bash)
python setup.py develop
```

## Running the Lotka-Volterra simulation

- The Lotka-Volterra simulator class exists in `repo/causal/base/lotka_volterra.py`.
- The Lotka-Volterra simulation parameters are fetched from `repo/causal/config.py`.
- The Lotka-Volterra simulator class exists in `repo/causal_inference/base/lv_simulator.py`.
- The Lotka-Volterra simulation parameters are fetched from `repo/causal_inference/config.py`.
You can edit the `config.py` file directly to play around with the parameter values.

- You can run the simulator directly from terminal by running

```(bash)
python causal/base/lotka_volterra.py
python causal_inference/base/lv_simulator.py
```

- The simulation statistics will be saved in the `repo/results` directory.

0 comments on commit 6f70e21

Please sign in to comment.