Metadata-Version: 2.1
Name: pykrack
Version: 0.0.2
Summary: Computing Krackhardt hierarchy score on netowrkX graphs
Home-page: https://github.com/FerranC96/pykrack
Author: FerranC96
Author-email: ferricaro@hotmail.com
License: Apache Software License 2.0
Keywords: nbdev jupyter notebook python
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Developers
Classifier: Natural Language :: English
Classifier: Programming Language :: Python :: 3.7
Classifier: Programming Language :: Python :: 3.8
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: License :: OSI Approved :: Apache Software License
Requires-Python: >=3.7
Description-Content-Type: text/markdown
Provides-Extra: dev
License-File: LICENSE

# pyKrack

<!-- WARNING: THIS FILE WAS AUTOGENERATED! DO NOT EDIT! -->

## Install

Due to the comparisons with the R package `sna` we recommend using conda
to manage your environment.

1.  First create the pykrack conda environment from the environment.yml
    file:

``` sh
conda (or mamba) env create -f environment.yml
```

2.  Then load the conda environment with:

``` sh
conda activate pykrack
```

3.  And finally install the package from pip via the following command:

``` sh
pip install pyKrack
```

Alternatively pyKrack can also be isntalled using pip via the following
command

``` sh
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`](https://FerranC96.github.io/pykrack/hierarchy.html#compute_hierarchy).

------------------------------------------------------------------------

<a
href="https://github.com/FerranC96/pykrack/blob/main/pykrack/hierarchy.py#LNone"
target="_blank" style="float:right; font-size:smaller">source</a>

### 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:<br>‘pykrack’ for this module’s implementation of the Krackhardt score.<br>‘rsnakrack’ for the sna implementation in R.<br>‘hierarchy_flow’ for the Luo and Magee 2011 as implemented in the NetworkX package. |
| **Returns** | **float** |             | **One of the possible hierarchy scores**                                                                                                                                                                                                                               |
