Skip to main content

The graphid Module

Pypi PypiDownloads GithubActions Codecov ReadTheDocs

Read the docs

https://graphid.readthedocs.io

Github

https://github.com/Erotemic/graphid

Pypi

https://pypi.org/project/graphid

Graph Identification

A graph algorithm to manage the identification of individuals in a population using automatic pairwise decision algorithms with a humans in the loop. It is agnostic to the specific ranking and verification algorithms. In fact, it can work without a ranking or verification algorithm, but in that case all reviews will have to be manual, and it will be difficult to prioritize which pairs of annotations (typically images) to look at first.

This is the graph identification described in Chapter 5 of my thesis. Viewing this PDF online can be slow, so I’ve linked there raw text here.

General Information

While this repo is functional, I don’t maintain it as often as I do for other libraries that I regularly use. Its use case is fairly niche.

Helpful commands I’m currently using in development and debugging. Perhaps they will be somewhat illustrative of what this package is trying to do.

python -m graphid.demo.dummy_infr demodata_infr --show
python -m graphid.demo.dummy_infr demodata_infr --num_pccs=25 --show
python -m graphid.demo.dummy_infr demodata_infr --num_pccs=100 --show

The first of these commands will generate an image that looks like this:

https://i.imgur.com/CAUJVc5.png

The “aid” is an annotation id, the “nid” is a name id. Blue edges mean two annotation match. Red edges mean two annotations don’t match. Yellow edges means that two annotations are not comparable (i.e. not enough info to determine if they match or not). Edges that are highlighted are ones flagged by the program for the user to re-check because it inferred that there is an inconsistency in the graph. Edges that are dotted, are flagged by the program as actually between two distinct individuals.

This README is a mess. Why not look at this Jupyter notebook in the meantime. (Note as of 2019-June-09 the GitHub viewer seems broken, but this link is working)

Installation

You should be able to simply pip install graphid. However, you might have an issue with pygraphviz. There also may be issues on Python 3.7 due to use of StopIteration.

Dependencies

sudo apt-get install -y graphviz libgraphviz-dev
pip install pygraphviz

See pygraphviz install details for more information and instructions for non-debian systems.

This project is Python 3.6+, Python 2 is not supported.

If you want to be able to draw the graphs, you must install graphviz, which is needed by pygraphviz.

I’m currently having trouble getting this to work on windows due to pygraphviz.

Conda can be used to install pygraphviz on Windows? conda install -c marufr pygraphviz. Not sure if this works. I recommend avoiding conda if possible, but Windows is one place where I think it has a good use-case.

Metadata

Release files for graphid 0.1.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for graphid 0.1.2
File Size Uploaded Provenance Actions
graphid-0.1.2.tar.gz 222.3 kB Without provenance Details for graphid-0.1.2.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for graphid 0.1.2
File Interpreter ABI Platform Actions
graphid-0.1.2-py3-none-any.whl Python 3 none any Details for graphid-0.1.2-py3-none-any.whl

Total release size: 462.3 kB

Release files / graphid-0.1.2.tar.gz

Download URL graphid-0.1.2.tar.gz
Size 222.3 kB
Tags Source
SHA-256 checksum
How to use checksums
d83e33bae536bb4fb69e11c5ba2dbcf28d91c7e34c1a3292517848146fefbd00
BLAKE2b-256 checksum
How to use checksums
dcdc6803d206d9e481c83d1f4237b11ef5c013f58df6db3ab5bc5b331680127d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.12.3

Release files / graphid-0.1.2-py3-none-any.whl

Download URL graphid-0.1.2-py3-none-any.whl
Size 240.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
c07a25aa56d17c01decd3cb5d93d4cc2fc3a9ab4ebef4ad863b34fd12965984e
BLAKE2b-256 checksum
How to use checksums
615f6eb5c7989095d37795287d3d4e7cb32f5d52ebfec74f474fc2a5c61c1523
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.12.3

Security for graphid 0.1.2

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.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page