{"id":19558018,"url":"https://github.com/mbjoseph/neuralecology","last_synced_at":"2025-04-26T23:31:39.475Z","repository":{"id":62692429,"uuid":"206636551","full_name":"mbjoseph/neuralecology","owner":"mbjoseph","description":"Code for the paper \"Neural hierarchical models of ecological populations\"","archived":false,"fork":false,"pushed_at":"2022-11-06T21:57:55.000Z","size":13939,"stargazers_count":28,"open_issues_count":0,"forks_count":10,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-04-04T18:21:40.826Z","etag":null,"topics":["bayesian","deep-learning","ecology","hierarchical-model","occupancy","research-compendium","science-based-deep-learning"],"latest_commit_sha":null,"homepage":"","language":"Jupyter Notebook","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-3-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/mbjoseph.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2019-09-05T18:58:19.000Z","updated_at":"2025-01-21T15:26:54.000Z","dependencies_parsed_at":"2023-01-22T09:45:49.082Z","dependency_job_id":null,"html_url":"https://github.com/mbjoseph/neuralecology","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mbjoseph%2Fneuralecology","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mbjoseph%2Fneuralecology/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mbjoseph%2Fneuralecology/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mbjoseph%2Fneuralecology/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mbjoseph","download_url":"https://codeload.github.com/mbjoseph/neuralecology/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":251068038,"owners_count":21531475,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["bayesian","deep-learning","ecology","hierarchical-model","occupancy","research-compendium","science-based-deep-learning"],"created_at":"2024-11-11T04:44:44.181Z","updated_at":"2025-04-26T23:31:38.035Z","avatar_url":"https://github.com/mbjoseph.png","language":"Jupyter Notebook","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Neural hierarchical models of ecological populations\n\n[![DOI](https://zenodo.org/badge/206636551.svg)](https://zenodo.org/badge/latestdoi/206636551)\n\nPaper: https://onlinelibrary.wiley.com/doi/full/10.1111/ele.13462  \nPreprint: https://www.biorxiv.org/content/10.1101/759944v3\n\n### Key idea\n\nParameterize a hierarchical model (an observation + process + parameter model) with a neural network, creating a **neural hierarchical model**.\n\n![Alt text](./fig/fig2.svg)\n\nHere, (a) shows linear regression, mapping input x to an output y. \nIn (b) a neural network inserts hidden layers between x and y.\nAnalogously, an ecological model (c) maps an input x to parameters of a hierarchical model.\nA neural version of model (d) would similarly involve hidden layers between x and these parameters. \nDeep models (e) can also be constructed that use more complex neural architectures, especially when data are structured in time, space, and/or over networks. \n\nA variety of neural network components can be readily used in neural hierarchical models. \nFor 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). \n\n![convHMM](fig/conv_hmm_edited.png)\n\n## Hardware requirements\n\n- 20+ GB of RAM\n- 4 or more CPU cores\n- GPU recommended\n\n## Setting up the environment\n\nThis project uses [conda](https://docs.conda.io/en/latest/) to install python dependencies.\n\n```\nconda env create -f environment.yml\n```\n\nOnce installed, activate the environment via:\n\n```\nconda activate neural-ecology\n```\n\nTo install R dependencies:\n\n```\nR -e \"devtools::install_deps(dependencies = TRUE)\"\n```\n\n## Running the toy models\n\n[![Binder](https://mybinder.org/badge_logo.svg)](https://mybinder.org/v2/gh/mbjoseph/neuralecology/master)\n\nThe `notebooks/` subdirectory contains toy models in Jupyter notebooks:\n\n- [A neural occupancy model](notebooks/simple-occupancy.ipynb)\n- [A neural dynamic occupancy model](notebooks/dynamic-occupancy.ipynb)\n- [A neural N-mixture model](notebooks/n-mixture-model.ipynb)\n- [A deep Markov model for capture-recapture data](notebooks/hidden-markov-model.ipynb)\n\n## Building the paper\n\nThe workflow for building the paper is handled with GNU Make. \nTo build the paper (including running the models for the case study) takes ~ 5 hours with 6 CPU cores and a GPU. \n\n```\nmake\n```\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmbjoseph%2Fneuralecology","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmbjoseph%2Fneuralecology","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmbjoseph%2Fneuralecology/lists"}