Computing Krackhardt hierarchy score on netowrkX graphs
Project description
pyKrack
This file will become your README and also the index of your documentation.
THIS IS CLEARLY STILL A WORK IN PROGRESS PROJECT
Install
Due to the comparisons with the r package sna We recommend using conda. Create an environment using the environment.yml file, load it and install/run the package.
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 |
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.