Skip to main content

No project description provided

Project description

MultiNetPy

MultiNetPy is a Python package for analyzing multiplex networks. It provides functionalities for importing multiplex network data and computing centrality measures Installation

Install the dependencies using pip: pip install -r requirements.txt

Import a multiplex network dataset

mg = gm.Import_Graph.make_graph( "YourPath_nodes.txt", "YourPath_nodes.edges", "YourPath_nodes_layers.txt" )

Compute centrality measures

First define desires centrality measure, including betweenness and closeness

aggregated_centralities_CC1 = mg.aggregated_CC() weighted_centralities_CC1 = mg.weighted_CC() aggregated_centralities_BC1 = mg.aggregated_BC() weighted_centralities_BC1 = mg.weighted_BC()

Use some other centrality measures in networkX

test = mg.Centralities(nx.degree_centrality) # define desired centrality measure mg.aggregated_centralityTest(nx.degree_centrality)

Code used for comparing a table with calculated centralities

file_path1 =' path_BC.xlsx.' file_path2 ='path_CC.xlsx'

Load the table ranks

table_rank1 = mg.load_table_ranks_from_excel(file_path1) table_rank2 = mg.load_table_ranks_from_excel(file_path2)

kendall's tau

print("kendall's tau in betweenness:") mg.plot_kendall_tau(aggregated_centralities_BC1, weighted_centralities_BC1, table_rank1) print("\nkendall's tau in Closeness Centrality:\n") mg.plot_kendall_tau(aggregated_centralities_CC1, weighted_centralities_CC1, table_rank1)

isim

a, b, c = mg2.intersection_similarity(table_rank2, aggregated_centralities_CC1, weighted_centralities_CC1, max_k=20) print("\nisim in closeness:\n") mg2.display_isim_table(a, b, c)

rank difference

print("\nrank difference in betweenness in your dataset:\n") Rb, R2b, R3b = mg.Rank_Difference(table_rank1, aggregated_centralities_BC1, weighted_centralities_BC1) mg.plot_rank_difference(Rb, R2b, R3b) print("\nrank difference in closeness:\n") R, R2, R3 = mg.Rank_Difference(table_rank2, aggregated_centralities_CC1, weighted_centralities_CC1) mg.plot_rank_difference(R, R2, R3)

Documentation Detailed documentation for each function and class can be found in the source code.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

multinetpy-0.1.2.tar.gz (26.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

multinetpy-0.1.2-py3-none-any.whl (31.7 kB view details)

Uploaded Python 3

File details

Details for the file multinetpy-0.1.2.tar.gz.

File metadata

  • Download URL: multinetpy-0.1.2.tar.gz
  • Upload date:
  • Size: 26.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.0.1 CPython/3.13.0

File hashes

Hashes for multinetpy-0.1.2.tar.gz
Algorithm Hash digest
SHA256 c850016c66474669251ce8c6547e5a4bf11123c75b19ef7ff448405290d533dc
MD5 a7cfd08aeaf0cb8651138e36d406f6a1
BLAKE2b-256 69820ecadd1f8323435c9da579497ed3bb8fc19d5fd3f5379a1bc0d857944e15

See more details on using hashes here.

File details

Details for the file multinetpy-0.1.2-py3-none-any.whl.

File metadata

  • Download URL: multinetpy-0.1.2-py3-none-any.whl
  • Upload date:
  • Size: 31.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.0.1 CPython/3.13.0

File hashes

Hashes for multinetpy-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 2181ad43d591c0380cae707ef13378fe54fa228575378a50dfec478e4fdec4e3
MD5 e0da5d8acce94b573a3dd45c7c086815
BLAKE2b-256 fc9704bb55d938b761abfa131f24332e0f40f6c1f4e53a7bbf0a28c20589bacd

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page