Skip to main content

calculate the similarity index of the label graph pairs package in python.

Project description

similarity_index_of_label_graph

PyPI PyPI - Status GitHub Release Date Build Status Code Intelligence Status Language grade: Python Codacy Badge Scrutinizer Code Quality PyPI - Downloads PyPI - Python Version PyPI - License

calculate the similarity index of the label graph pairs package in python.

Can be used for weighted/unweighted and directed/undirected networks.

Installation

Installation can be done through pip. You must have python version >= 3.7

pip install similarity-index-of-label-graph

Usage

The statement to import the package:

from similarity_index_of_label_graph_package import similarity_index_of_label_graph_class

Example:

>>> from networkx.generators.directed import gnr_graph
>>> from networkx.generators import spectral_graph_forge
>>> G1 = gnr_graph(100, 0.3, seed = 65535)
>>> G2 = gnr_graph(100, 0.3, seed = 1)
>>> G3 = spectral_graph_forge(G1, 0.6, seed = 65535)
>>> G4 = spectral_graph_forge(G2, 0.6, seed = 65535)
>>> similarity_index_of_label_graph = similarity_index_of_label_graph_class()
>>> similarity_index_of_label_graph(G1, G2)
0.7651719671571124
>>> similarity_index_of_label_graph(G1, G3)
-0.8580896120374933
>>> similarity_index_of_label_graph(G2, G4)
-0.8440113193737153
>>> similarity_index_of_label_graph(G3, G4)
0.7314483604914666

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

similarity_index_of_label_graph-2.0.1.tar.gz (4.8 kB view hashes)

Uploaded Source

Built Distribution

Supported by

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