View source: R/graph_feature.R

KLdegree | R Documentation |

'KLdegree' computes the Kullback-Liebler divergence among the density functions of the degrees of two or more graphs

KLdegree(f)

`f` |
a list containing the components 'x' and 'densities'. The first element is the vector 'x' of 'npoints' coordinates of the points where the density function i estimated, and the second is a vector 'y' of the estimated density values. |

returns a list containing the components 'theta' and 'partial'. 'theta' is a value representaing the Kullback-Liebler divergence among the corresponding distributions. 'partial' is a vector of KL divergences between each network distribuiton and the average degree distribution.

`graph.strength`

`density`

G<-list() G[[1]]<-erdos.renyi.game(30,0.6) G[[2]]<-barabasi.game(30,power = 1) G[[3]]<-watts.strogatz.game(2,30,2,0.3) f<-nDegreeDensities(G, npoints=1024, bandwidth="Sturges") KLdegree(f)

Embedding an R snippet on your website

Add the following code to your website.

For more information on customizing the embed code, read Embedding Snippets.