FastKnill - An alternative fast computation of Euler characteristics and Knill curvature from networks
Author: Danillo Barros de Souza
ORCID: 0000-0002-7792-8862
This work is inspired by the proposed new methods for computations of cliques in Vietoris-Rips complexes [1]. We provide a set-theoretical Python coding for efficiently computing the Knill curvature and the Euler characteristics for simplicial complexes. For alternative geometric computations, see also [2]
Current version:
0.2.0
Content:
fastknill.pyxcompiler.pysetup.py
Python version:
3.8.5
Package requirement:
numpynetworkxcythonscikit-learn
Installation:
The files fastknill.pyx, compiler.py and setup.py must be placed at the same directory.
Local installation:
To this purpose, the user will need to compile the file compiler.py in cython by running the command:
python3 compiler.py build_ext --inplace
Global installation:
Run setup.py by executing the command:
pip install .
After successful compilation, the generated fastknill file can be imported as a package, for instance:
import fastknill as fk
Functions:
-
compute_knill:Input:
-
D, can be:-
A
dictionaryin which the keys are integer numbers from 0 to len(D)-1 and the values are the N-dimensional points; -
A symmetric
numpy.matrixof float numbers; -
A simple undirected
nx.Graphthat may include the featureweightson edges attributes; -
A
stringof thegraph/graphmlfile in a directory.
-
-
cutoff: Float number for the threshold distance between points. -
n_neighbors: Interger, the number of the nearest neighbours to consider. If None, it is not applied. -
max_dim: Integer, the maximum simplex dimension to compute FRC. -
metric: string, the metric in which the pairwise distance is computed. If D is not a dictionary, this parameter is ignored. -
mapped_nodes: True or False - if the mapping of the original node labels is kept.
Output:
A dictionary whose keys are the noded and the values are the Knill curvature of each node.
-
-
compute_euler:Input:
-
D, can be:-
A
dictionaryin which the keys are integer numbers from 0 to len(D)-1 and the values are the N-dimensional points; -
A symmetric
numpy.matrixof float numbers; -
A simple undirected
nx.Graphthat may include the featureweightson edges attributes; -
A
stringof thegraph/graphmlfile in a directory.
-
-
cutoff: Float number for the threshold distance between points. -
n_neighbors: Integer, the number of the nearest neighbours to consider. If None, it is not applied. -
metric: string, the metric in which the pairwise distance is computed. If D is not a dictionary, this parameter is ignored. -
max_dim: Integer, the maximum simplex dimension to compute FRC. -
mapped_nodes: True or False - if the mapping of the original node labels is kept.
Output:
An integer, the Euler characteristics of the input network.
-
Contact and Support:
danillo.dbs16@gmail.com, danillo.bsouza@proton.me
References:
[1] Alternative set-theoretical algorithms for efficient computations of cliques in Vietoris-Rips complexes, Barros de Souza, Danillo; da Cunha, Jontatas, A.N. Santos, Fernando; Desroches, Mathieu & Rodigues, Serafim; link
[2] Efficient set-theoretic algorithms for computing high-order Forman-Ricci curvature on abstract simplicial complexes; Barros de Souza, Danillo; da Cunha, Jontatas, A.N. Santos, Fernando; Jost, Juergen & Rodigues, Serafim; Link
Metadata
Release files for fastknill 0.2.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| fastknill-0.2.0.tar.gz | 130.0 kB | Without provenance | Details for fastknill-0.2.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| fastknill-0.2.0-cp312-cp312-manylinux2014_x86_64.manylinux_2_17_x86_64.whl | CPython 3.12 | CPython 3.12 | Linux glibc 2.17+ x86-64 | Details for fastknill-0.2.0-cp312-cp312-manylinux2014_x86_64.manylinux_2_17_x86_64.whl |
Total release size: 335.6 kB
Release files / fastknill-0.2.0.tar.gz
| Download URL | fastknill-0.2.0.tar.gz |
|---|---|
| Size | 130.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
364dd91215ab8138e51f9e08a5627248b11885193da8543eee88715925eff0ae
|
|
BLAKE2b-256 checksum How to use checksums |
f3ba7ed09fba9f6fb5900046ed5905175ca1f1a60307f41ee29e785f33333ba4
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.12.16
|
Release files / fastknill-0.2.0-cp312-cp312-manylinux2014_x86_64.manylinux_2_17_x86_64.whl
| Download URL | fastknill-0.2.0-cp312-cp312-manylinux2014_x86_64.manylinux_2_17_x86_64.whl |
|---|---|
| Size | 205.7 kB |
| Tags | CPython 3.12 Linux glibc 2.17+ x86-64 |
|
SHA-256 checksum How to use checksums |
17a90cbea1763ff8dd16023cafa4190dcf24bfa0c2d0cdc30b14a91ed257b5cf
|
|
BLAKE2b-256 checksum How to use checksums |
79eeb3187e25647af33fc65a9105b5834b31f5a4064c432053e5d295e0eabe08
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.12.16
|
Security for fastknill 0.2.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.