jSDM package
Project description
sjSDM - Fast and Accurate Joint Species distribution Modeling
Currently we don't provide specifically a API for joint species distribution models. However, it's just a deep multivariate probit model with one layer (example below).
We provide a R package with an API focused on JSDMs which is available here.
References:
Install instructions
Dependencies:
- PyTorch >= 1.7, see PyTorch for install instructions.
pip install sjSDM_py
Example
linear jSDM:
import sjSDM_py as sa
import numpy as np
Env = np.random.randn(100, 5)
Occ = np.random.binomial(1, 0.5, [100, 10])
model = sa.Model_base(5) # input_shape == number of environmental predictors
model.add_layer(sa.layers.Layer_dense(hidden=10)) # number of hidden units in the layer == number of species
model.build(df=5, optimizer=sa.optimizer_adamax(lr=0.1, weight_decay = 0.01)) # df = degree of freedom
model.fit(X = Env, Y = Occ)
print(model.weights_numpy)
print(model.get_cov())
- For species intercept, use 'bias=True' in 'Layer_dense(...)'.
- We recommend setting 'df = number of species / 2.'
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
sjSDM_py-0.1.0.tar.gz
(17.4 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
sjSDM_py-0.1.0-py2-none-any.whl
(35.0 kB
view details)
File details
Details for the file sjSDM_py-0.1.0.tar.gz.
File metadata
- Download URL: sjSDM_py-0.1.0.tar.gz
- Upload date:
- Size: 17.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.4.1 importlib_metadata/4.0.1 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.60.0 CPython/3.6.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
df5edfa55910c79e5f192590d99a566e70e60b2d0fe118c569f57e1a0a19b29d
|
|
| MD5 |
b3ad96bf83d488fce6a5504ab2addbbd
|
|
| BLAKE2b-256 |
7057735993e6f6f83e99f4adb2c487d626a597f2ce14138c4a0c18966c86cae7
|
File details
Details for the file sjSDM_py-0.1.0-py2-none-any.whl.
File metadata
- Download URL: sjSDM_py-0.1.0-py2-none-any.whl
- Upload date:
- Size: 35.0 kB
- Tags: Python 2
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.4.1 importlib_metadata/4.0.1 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.60.0 CPython/3.6.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
02bfefb0a6b671f5555f596e062e110b99d719ea8fa70fd050b1fc87b55f63c0
|
|
| MD5 |
7b38781875f83fb4b03038e734d850de
|
|
| BLAKE2b-256 |
1914e9b8586832a81e2b1dd7a64587a71885f06e35c1b23b5879250cd9bf0ee2
|