
Security News
Bun 1.2.19 Adds Isolated Installs for Better Monorepo Support
Bun 1.2.19 introduces isolated installs for smoother monorepo workflows, along with performance boosts, new tooling, and key compatibility fixes.
The graph ensemble package contains a set of methods to build fitness based graph ensembles from marginal information.
.. image:: https://travis-ci.com/LeonardoIalongo/graph-ensembles.svg?branch=master :target: https://travis-ci.com/LeonardoIalongo/graph-ensembles
The graph ensemble package contains a set of methods to build fitness based graph ensembles from marginal information. These methods can be used to build randomized ensembles preserving the marginal information provided.
Install using:
.. code-block:: python
pip install graph_ensembles
Currently only the RandomGraph and StripeFitnessModel are fully implemented. An example of how it can be used is the following. For more see the example notebooks in the examples folder.
.. code-block:: python
import graph_ensembles as ge
import pandas as pd
v = pd.DataFrame([['ING', 'NL'],
['ABN', 'NL'],
['BNP', 'FR'],
['BNP', 'IT']],
columns=['name', 'country'])
e = pd.DataFrame([['ING', 'NL', 'ABN', 'NL', 1e6, 'interbank', False],
['BNP', 'FR', 'ABN', 'NL', 2.3e7, 'external', False],
['BNP', 'IT', 'ABN', 'NL', 7e5, 'interbank', True],
['BNP', 'IT', 'ABN', 'NL', 3e3, 'interbank', False],
['ABN', 'NL', 'BNP', 'FR', 1e4, 'interbank', False],
['ABN', 'NL', 'ING', 'NL', 4e5, 'external', True]],
columns=['creditor', 'c_country',
'debtor', 'd_country',
'value', 'type', 'EUR'])
g = ge.MultiDiGraph(v, e, v_id=['name', 'country'],
src=['creditor', 'c_country'],
dst=['debtor', 'd_country'],
edge_label=['type', 'EUR'],
weight='value')
# Initialize model
model = ge.MultiFitnessModel(g)
# Fit model parameters
model.fit()
# Sample from the ensemble
model.sample()
Please work on a feature branch and create a pull request to the development branch. If necessary to merge manually do so without fast forward:
.. code-block:: bash
git merge --no-ff myfeature
To build a development environment run:
.. code-block:: bash
python3 -m venv env
source env/bin/activate
pip install -e .
pip install -r requirements.txt
For testing:
.. code-block:: bash
pytest --cov
This is a project by Leonardo Niccolò Ialongo <https://datasciencephd.eu/students/leonardo-niccol%C3%B2-ialongo/>
_ and Emiliano Marchese <https://www.imtlucca.it/en/emiliano.marchese/>
, under
the supervision of Diego Garlaschelli <https://networks.imtlucca.it/members/diego>
.
FAQs
The graph ensemble package contains a set of methods to build fitness based graph ensembles from marginal information.
We found that graph-ensembles demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Bun 1.2.19 introduces isolated installs for smoother monorepo workflows, along with performance boosts, new tooling, and key compatibility fixes.
Security News
Popular npm packages like eslint-config-prettier were compromised after a phishing attack stole a maintainer’s token, spreading malicious updates.
Security News
/Research
A phishing attack targeted developers using a typosquatted npm domain (npnjs.com) to steal credentials via fake login pages - watch out for similar scams.