depytrace
This project provides an algorithm for fast
extraction of high-conductance trees (called core traces)
rooted on designated graph nodes.
License: Apache Software License
Author: Emmanouil (Manios) Krasanakis
Dependencies: networkx (required) pcst_fast (optional)
Roadmap
❌ Method ensemble.
❌ Application for github project understanding.
Quickstart
Install the library in your environment,
for example per pip install depytrace.
Then, create a networkx graph, select a root node and run the snippet:
import depytrace as dp
graph, root = ...
trace = dp.Core()(graph, root)
print(dp.conductance(graph, trace))
Features
- Near-linear running time with respect to the number of edges (doubling the edges, approximately doubles running time).
- Provable 1+A factor approximations of maximum conductance, where A tend to be small.
- Extensibility to future breakthroughs on Steiner problems.
Customization
Core trace extraction is actually an NP-complete problem. For this reason, solutions provided by this library are approximate and trade-off tightness for speed.
In particular, solutions are found with an algorithm called trace contraction, which internally relies on iteratively solving an NP-complete problems called ELOD maximization. In turn, the latter can be translated to rooted Steiner tree problems. To accommodate future theoretical breakthroughs, the library allows setting up custom ELOD solvers, where tighter solvers translate to tighter theoretical bounds of the trace contraction algorithm.
The dafault ELOD maximizer is a heuristic written in native Python and is
chosen thanks to its cross-platform support. For systems that integrate
the gcc compiler (e.g. Linux, Windows with mingw installed) you can
also use a maximizer provided by the library that adjusts and depends on the
pcst_fast Steiner tree solver.
To use the related maximizer, just install the pcst_fast library
(if gcc is properly set up, this should be as simple as
pip install pcst_fast) and run the snipper:
import depytrace as dp
graph, root = ...
trace = dp.Core(dp.cleverRPCST)(graph, root)
print(dp.conductance(graph, trace))
Metadata
Release files for depytrace 0.0.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| depytrace-0.0.2-py3-none-any.whl | Python 3 | none | any | Details for depytrace-0.0.2-py3-none-any.whl |
Release files / depytrace-0.0.2-py3-none-any.whl
| Download URL | depytrace-0.0.2-py3-none-any.whl |
|---|---|
| Size | 12.2 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
c3833891e307ae3c3dc72b5758379e2acf0cf75908b66943d487cf96669f1753
|
|
BLAKE2b-256 checksum How to use checksums |
2e0ccef83fa0d1781bcef3a8f8a2e6c30402becf641997238e7ba3a023cbaa14
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.1 CPython/3.9.13
|
Security for depytrace 0.0.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.