Giter Club home page Giter Club logo

graphs-2's Introduction

R

consenus.final()

This function is passed a matrix named data where each column is an item and each row is a membership vector corresponding to a partition of the items according to a clustering method. The elements (numbers) composing each row have no meaning other than indicating membership and are recycled from row to row. The function returns the majority vote partition. When no consensus exists for a particular item, the partition given by the first row wins. Within the framework of graph mining, this allows the partition maximizing the modularity function to win if the partitions are ordered by decreasing values of modularity in the matrix. See examples here or in the "Examples" file.

weight.community()

This function ensures that nodes are laid out according to their community membership when a graph is plotted (with igraph). The membership argument is the membership vector from the result of any community detection algorithm, given by membership(comm). The weights arguments are two numbers weight.within and weight.between, and have to be tweaked for each graph to obtain optimal results (however, 10 and 1 are good starting values). The higher the values of the ratio weight.within/weight.between, the more tightly grouped the communities will be.

The user simply has to apply the function over the rows of the matrix of edges of the graph (given by get.edgelist(g)) to set the edge weights, and to use a layout algorithm that accepts edge weights such as the fruchterman.reingold:

E(g)$weight=apply(get.edgelist(g),1,weight.community,membership,10,1) g$layout=layout.fruchterman.reingold(g,weights=E(g)$weight)

See example here.

cores_dec()

This function performs unweighted or weighted k-core decomposition of an undirected and (optionally) edge-weighted graph. The reference is Batagelj and Zaveršnik (2002).

Examples

This file contains examples for the abovelisted functions.

Python

cores_dec()

This function performs unweighted or weighted k-core decomposition of an undirected and (optionally) edge-weighted graph. The reference is Batagelj and Zaveršnik (2002).

graphs-2's People

Contributors

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