Code Monkey home page Code Monkey logo

occuspytial's Introduction

OccuSpytial

Documentation Status codecov zoj613 PyPI - Python Version PyPI PyPI - License

A package for fast bayesian analysis of spatial occupancy models. OccuSpytial implements several samplers for the single season site spatial occupancy model using the Intrinsic Conditional Autoregressive (ICAR) model for spatial random effects.

Usage

For usage examples refer to the project's documentation.

Installation

The package can be installed using pip.

pip install occuspytial

Alternatively, it can be installed from source using poetry

git clone https://github.com/zoj613/OccuSpytial.git
cd OccuSpytial/
poetry install

Note that installing this way requires that Cython is installed for a successful build.

Testing

To run tests after installation, the package pytest is required. Simply run the following line from the terminal in this package's root directory.

python -m pytest

If all tests pass, then you're good to go.

Licensing

OccuSpytial is free software made available under the BSD License. For details see the LICENSE file.

occuspytial's People

Contributors

zoj613 avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar

Forkers

sandy4321

occuspytial's Issues

Gibbs resample method broken

resample method of gibbs samplers is broken since #16 since the PR removes the _excluded attribute in the PosteriorParameter class.

Make use of numpy's universal functions to simplify codebase

numpy.add.reduceat can be used instead of the cython module with function

def split_sum(double[:] arr, long[:] sections, double[:] out):
cdef:
double summation
long previous, current, size = out.shape[0]
Py_ssize_t i, j
with nogil:
for i in range(size):
previous = sections[i]
current = sections[i + 1]
summation = 0
for j in range(previous, current):
summation += arr[j]
out[i] = summation

Numpy universal functions are fast so the speed should roughly be the same.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.