New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

community_detect

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

community_detect

Community Detector based on algorithm for community detection using structural and attribute similarities

  • 1.0.0
  • PyPI
  • Socket score

Maintainers
1

community-detect

Community detection using attribute and structural similarities.

Installation:

pip install community_detect

Dependencies:

NetworkX

Matplotlib

Usage:

Import:

from community_detect import Community

Initialize:

com = Community(alpha_weight = 0.5) #You can add your own value for Alpha

Functions:

Main method: get_communities(Graph, #Your Graph

                     Vertices, #List of Vertices

                     Similarity Matrix, #Similarity matrix for attribute similarities (It should be a N X N matrix where N is the number of vertices

                     Similarity Matrix Type #Types : cosine, euclidean etc

                     )

    Returns a dictionary with each key containing all the nodes in that community

To View Communities : view_communities(Communities, #Output of above function

                               Graph, #Your Graph

                               Vertices, #List of Vertices

                               Similarity Matrix, #Similarity matrix for attribute similarities (It should be a N X N matrix where N is the number of vertices

                               Similarity Matrix Type #Types : cosine, euclidean etc

                               )

Keywords

FAQs


Did you know?

Socket

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.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc