Coder Social home page Coder Social logo

polyshang / similarity_index_of_label_graph Goto Github PK

View Code? Open in Web Editor NEW

This project forked from fsssosei/similarity_index_of_label_graph

0.0 0.0 0.0 62 KB

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

License: GNU Affero General Public License v3.0

Python 100.00%

similarity_index_of_label_graph's Introduction

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

similarity_index_of_label_graph's People

Contributors

fsssosei avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.