Navigation Menu

Skip to content

fsssosei/similarity_index_of_label_graph

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

21 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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.8

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

About

This is the package used to calculate the similarity index of the label graph pairs.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages