Nestedness Calculator for Python
Ths package provides a nestedness calculator for binary matrices, written in Python.
Currently implemented algorithms are:
- NODF (Nestedness based on Overlap and Decreasing Fill) [AlmeidaNeto2008]
Author
Mika J. Straka
This Version
The newest version can be found at https://github.com/tsakim/nestedness
Usage
Be mat
a two-dimensional binary NumPy array.
- The NODF nestedness can be calculated directly without initializing a class instance::
>>> from nestedness_calculator import NestednessCalculator
>>> nodf_score = NestednessCalculator(mat).nodf(mat)
When calling NestednessCalculator(mat)
, the algorithm checks that the matrix
is binary and raises an error if it is not. Furthermore, if one or more columns or rows consist only of zeros,
the program aborts.
Dependencies
The module has been written in Python 2.7 and uses the following packages:
References
Copyright (c) 2017 Mika J. Straka