Compute Moran's Index for images or adjacency matrix
Project description
Moran's Index
Compute Moran's Index for images or adjacency matrices
Installation
You can install moransi via pip:
pip install moransi
To install latest development version :
pip install git+https://github.com/GuignardLab/moransi.git
Usage
You can use this code after installing it the following way:
from moransi import morans_i_image
image = ... # opening an image
kernel = ... # A kernel for the weights of the neighbouring pixels
morans_i_image(image, kernel) # Returns the Moran's index
from moransi import morans_i_adjacency_matrix
adjacency_matrix = ... # an adjacency matrix of size N by N.
# It is either binary or links weights
# adjacency_matrix[i, j] is >0 if there is an edge
# between i and j
metric = ... # An array of size N where metric[i] is the value of node `i`
morans_i_adjacency_matrix(image, metric) # Returns the Moran's index
Contributing
Contributions are very welcome.
License
Distributed under the terms of the MIT license, "moransi" is free and open source software
Issues
If you encounter any problems, please file an issue along with a detailed description.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
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
File details
Details for the file moransi-1.0.1.tar.gz.
File metadata
- Download URL: moransi-1.0.1.tar.gz
- Upload date:
- Size: 4.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
715b8168afb64d9c4af9b51d7c50055f224e3a220438b9ce651be8600556fcc6
|
|
| MD5 |
9a5239dc024029eb313a3f2870388cb8
|
|
| BLAKE2b-256 |
ee453aff4bfc3c8aad7edb710b0bc2217556f6ae17886d43545b64e62fe74103
|
File details
Details for the file moransi-1.0.1-py3-none-any.whl.
File metadata
- Download URL: moransi-1.0.1-py3-none-any.whl
- Upload date:
- Size: 5.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
4cd5e5248536a0f50b7ff8cd54171e43c40d3271f3dea7c02c469aea0312a05b
|
|
| MD5 |
9670657d964f8e0fb83e36694eb49dfa
|
|
| BLAKE2b-256 |
67a6cbe30d342bfefaee61a63d99e01bb6fe132f56bc2e0a82fd18be04a38aa7
|