Skip to main content

jSDM package

Project description

sjSDM - Fast and Accurate Joint Species distribution Modeling

At the moment, we do not 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 jSDM is available here.

Install instructions

Dependencies:

  • PyTorch >= 1.4, 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 to set '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.0.2.tar.gz (8.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

sjSDM_py-0.0.2-py3-none-any.whl (22.7 kB view details)

Uploaded Python 3

File details

Details for the file sjSDM_py-0.0.2.tar.gz.

File metadata

  • Download URL: sjSDM_py-0.0.2.tar.gz
  • Upload date:
  • Size: 8.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/2.0.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/45.2.0 requests-toolbelt/0.9.1 tqdm/4.41.1 CPython/3.7.5

File hashes

Hashes for sjSDM_py-0.0.2.tar.gz
Algorithm Hash digest
SHA256 7d2aaad40db16b161cce38a6d39ee554e0589ee7d06f0813ca5f7dc721b4087b
MD5 b1ba87183b2fe2f3e71d36b1822b921c
BLAKE2b-256 b6b3bfac7247c412e67a1edf5dcead2d90f61d217725c405dcc33bee885cdcb7

See more details on using hashes here.

File details

Details for the file sjSDM_py-0.0.2-py3-none-any.whl.

File metadata

  • Download URL: sjSDM_py-0.0.2-py3-none-any.whl
  • Upload date:
  • Size: 22.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/2.0.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/45.2.0 requests-toolbelt/0.9.1 tqdm/4.41.1 CPython/3.7.5

File hashes

Hashes for sjSDM_py-0.0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 6020246df91601cef995e33f544fe788005bdb2a7c14e41b4e49b7140b3078d9
MD5 6679d67eeebfb35632d23ac62c585762
BLAKE2b-256 bac529c1c81e1af7083407178825cdd94861c5bbb49fe737fc6e71a3f25d02fe

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page