Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/mbjoseph/neuralecology
Code for the paper "Neural hierarchical models of ecological populations"
https://github.com/mbjoseph/neuralecology
bayesian deep-learning ecology hierarchical-model occupancy research-compendium science-based-deep-learning
Last synced: 2 months ago
JSON representation
Code for the paper "Neural hierarchical models of ecological populations"
- Host: GitHub
- URL: https://github.com/mbjoseph/neuralecology
- Owner: mbjoseph
- License: bsd-3-clause
- Created: 2019-09-05T18:58:19.000Z (over 5 years ago)
- Default Branch: main
- Last Pushed: 2022-11-06T21:57:55.000Z (about 2 years ago)
- Last Synced: 2024-06-11T17:06:18.991Z (7 months ago)
- Topics: bayesian, deep-learning, ecology, hierarchical-model, occupancy, research-compendium, science-based-deep-learning
- Language: Jupyter Notebook
- Homepage:
- Size: 13.3 MB
- Stars: 23
- Watchers: 2
- Forks: 10
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Neural hierarchical models of ecological populations
[![DOI](https://zenodo.org/badge/206636551.svg)](https://zenodo.org/badge/latestdoi/206636551)
Paper: https://onlinelibrary.wiley.com/doi/full/10.1111/ele.13462
Preprint: https://www.biorxiv.org/content/10.1101/759944v3### Key idea
Parameterize a hierarchical model (an observation + process + parameter model) with a neural network, creating a **neural hierarchical model**.
![Alt text](./fig/fig2.svg)
Here, (a) shows linear regression, mapping input x to an output y.
In (b) a neural network inserts hidden layers between x and y.
Analogously, an ecological model (c) maps an input x to parameters of a hierarchical model.
A neural version of model (d) would similarly involve hidden layers between x and these parameters.
Deep models (e) can also be constructed that use more complex neural architectures, especially when data are structured in time, space, and/or over networks.A variety of neural network components can be readily used in neural hierarchical models.
For example, you might parameterize a hidden Markov model of animal movement using a convolutional neural network that takes remotely sensed imagery as input (see Appendix S2 for details).![convHMM](fig/conv_hmm_edited.png)
## Hardware requirements
- 20+ GB of RAM
- 4 or more CPU cores
- GPU recommended## Setting up the environment
This project uses [conda](https://docs.conda.io/en/latest/) to install python dependencies.
```
conda env create -f environment.yml
```Once installed, activate the environment via:
```
conda activate neural-ecology
```To install R dependencies:
```
R -e "devtools::install_deps(dependencies = TRUE)"
```## Running the toy models
[![Binder](https://mybinder.org/badge_logo.svg)](https://mybinder.org/v2/gh/mbjoseph/neuralecology/master)
The `notebooks/` subdirectory contains toy models in Jupyter notebooks:
- [A neural occupancy model](notebooks/simple-occupancy.ipynb)
- [A neural dynamic occupancy model](notebooks/dynamic-occupancy.ipynb)
- [A neural N-mixture model](notebooks/n-mixture-model.ipynb)
- [A deep Markov model for capture-recapture data](notebooks/hidden-markov-model.ipynb)## Building the paper
The workflow for building the paper is handled with GNU Make.
To build the paper (including running the models for the case study) takes ~ 5 hours with 6 CPU cores and a GPU.```
make
```