pyKrack
Install
Due to the comparisons with the R package sna we recommend using conda
to manage your environment.
- First create the pykrack conda environment from the environment.yml file:
conda (or mamba) env create -f environment.yml
- Then load the conda environment with:
conda activate pykrack
- And finally install the package from pip via the following command:
pip install pyKrack
Alternatively pyKrack can also be isntalled using pip via the following command
pip install pyKrack
Then install the R dependencies listed in the conda environmnet.yml manually.
How to use
Please see the core and hierarchy notebooks for more detailed explanations.
pyKrack consists of one main function,
compute_hierarchy.
compute_hierarchy
compute_hierarchy (G, metric='pykrack')
Compute one of the possible hierarchy scores
| Type | Default | Details | |
|---|---|---|---|
| G | Directed NetworkX graph | ||
| metric | str | pykrack | Type of hierarchy metric to compute. Accepted types are: ‘pykrack’ for this module’s implementation of the Krackhardt score. ‘rsnakrack’ for the sna implementation in R. ‘hierarchy_flow’ for the Luo and Magee 2011 as implemented in the NetworkX package. |
| Returns | float | One of the possible hierarchy scores |
Release files for pykrack 0.0.3
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| pykrack-0.0.3.tar.gz | 9.3 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| pykrack-0.0.3-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 18.8 kB
Release files / pykrack-0.0.3.tar.gz
| Download URL | pykrack-0.0.3.tar.gz |
|---|---|
| Size | 9.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
93ef8a88fd32313f27872af620b7ab96e336fe863ee89d490e48145788d0e620
|
|
BLAKE2b-256 checksum How to use checksums |
b9b2e69fd057348ae3a289e73b9f9202e2ac582f9d8fbcdb87f93911ac9c1de4
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.10.12
|
Release files / pykrack-0.0.3-py3-none-any.whl
| Download URL | pykrack-0.0.3-py3-none-any.whl |
|---|---|
| Size | 9.6 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
0950abae4d7814ece14c31c032b2bedb54a0202682da795a211ba8da5778d4ba
|
|
BLAKE2b-256 checksum How to use checksums |
53a1c7bad4d22eb641b9ed31fc8c329f55de424d6da8edca372e0758d9fb582d
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.10.12
|