summaryrefslogtreecommitdiff
path: root/doc/knn_w.1
diff options
context:
space:
mode:
Diffstat (limited to 'doc/knn_w.1')
-rw-r--r--doc/knn_w.1147
1 files changed, 147 insertions, 0 deletions
diff --git a/doc/knn_w.1 b/doc/knn_w.1
new file mode 100644
index 0000000..289e657
--- /dev/null
+++ b/doc/knn_w.1
@@ -0,0 +1,147 @@
+.\" generated with Ronn/v0.7.3
+.\" http://github.com/rtomayko/ronn/tree/0.7.3
+.
+.TH "KNN_W" "1" "September 2017" "www.complex-networks.net" "www.complex-networks.net"
+.
+.SH "NAME"
+\fBknn_w\fR \- Compute the weighted average nearest neighbours degree function
+.
+.SH "SYNOPSIS"
+\fBknn_w\fR \fIgraph_in\fR [\fINO|LIN|EXP\fR \fIbin_param\fR]
+.
+.SH "DESCRIPTION"
+\fBknn_w\fR computes the weighted average nearest neighbours degree function knn_w(k) of the weighted graph \fIgraph_in\fR given as input\. The program can (optionally) average the results over bins of equal or exponentially increasing width (the latter is also known as logarithmic binning)\.
+.
+.SH "PARAMETERS"
+.
+.TP
+\fIgraph_in\fR
+undirected and weighted input graph (edge list)\. If is equal to \fB\-\fR (dash), read the edge list from STDIN\.
+.
+.TP
+NO
+If the second (optional) parameter is equal to \fBNO\fR, or omitted, the program will print on output the values of knn_w(k) for all the degrees in \fIgraph_in\fR\.
+.
+.TP
+LIN
+If the second (optional) parameter is equal to \fBLIN\fR, the program will average the values of knn_w(k) over \fIbin_param\fR bins of equal length\.
+.
+.TP
+EXP
+If the second (optional) parameter is equal to \fBEXP\fR, the progam will average the values of knn_w(k) over bins of exponentially increasing width (also known as \'logarithmic binning\', which is odd, since the width of subsequent bins increases exponentially, not logarithmically, but there you go\.\.\.)\. In this case, \fIbin_param\fR is the exponent of the increase\.
+.
+.TP
+\fIbin_param\fR
+If the second parameter is equal to \fBLIN\fR, \fIbin_param\fR is the number of bins used in the linear binning\. If the second parameter is \fBEXP\fR, \fIbin_param\fR is the exponent used to determine the width of each bin\.
+.
+.SH "OUTPUT"
+The output is in the form:
+.
+.IP "" 4
+.
+.nf
+
+ k1 knn_w(k1)
+ k2 knn_w(k2)
+ \.\.\.\.
+.
+.fi
+.
+.IP "" 0
+.
+.P
+If no binning is selected, \fBk1\fR, \fBk2\fR, etc\. are the degrees observed in \fIgraph_in\fR\. If linear or exponential binning is required, then \fBk1\fR, \fBk2\fR, etc\. are the right extremes of the corresponding bin\.
+.
+.SH "EXAMPLES"
+To compute the average neanest\-neighbours degree function of the US air transportation network we can run:
+.
+.IP "" 4
+.
+.nf
+
+ $ knn_w US_airports\.net
+ 1 81\.8
+ 2 30\.350938
+ 3 15\.198846
+ 4 15\.046341
+ 5 13\.967998
+ 6 16\.293341
+ 7 11\.746223
+ 8 11\.53912
+ 9 7\.9134643
+ 10 8\.317504
+ \.\.\.\.
+ 132 0\.46248989
+ 136 0\.47312661
+ 145 0\.37386548
+ $
+.
+.fi
+.
+.IP "" 0
+.
+.P
+Since we have not requested a binning, the program will output the value of knn_w(k) for each of the degrees actually observed in the input graph (the mininum degree is 1 and the maximum degree is 145)\. We can also ask \fBknn_w\fR to bin the results over 10 bins of equal width by running:
+.
+.IP "" 4
+.
+.nf
+
+ $ knn_w US_airports\.net 10
+ 16 68\.359133
+ 31 89\.519255
+ 46 78\.911709
+ 61 78\.802765
+ 76 76\.352358
+ 91 71\.589354
+ 106 60\.433329
+ 121 62\.600988
+ 136 64\.81641
+ 151 54\.210494
+ $
+.
+.fi
+.
+.IP "" 0
+.
+.P
+or to use instead an exponential binning:
+.
+.IP "" 4
+.
+.nf
+
+ $ knn_w US_airports\.net EXP 1\.3
+ 3 63\.062388
+ 6 70\.319368
+ 10 81\.856768
+ 15 79\.766008
+ 21 96\.172011
+ 29 84\.771533
+ 39 79\.591139
+ 52 80\.222237
+ 69 79\.776163
+ 91 72\.217712
+ 119 61\.878435
+ 155 62\.695227
+ $
+.
+.fi
+.
+.IP "" 0
+.
+.SH "SEE ALSO"
+knn(1), deg_seq(1)
+.
+.SH "REFERENCES"
+.
+.IP "\(bu" 4
+A\. Barrat et al\. "The architecture of complex weighted networks"\. P\. Natl\. Acad\. Sci USA 101 (2004), 3747\-3752\.
+.
+.IP "\(bu" 4
+V\. Latora, V\. Nicosia, G\. Russo, "Complex Networks: Principles, Methods and Applications", Chapter 10, Cambridge University Press (2017)
+.
+.IP "" 0
+.
+.SH "AUTHORS"
+(c) Vincenzo \'KatolaZ\' Nicosia 2009\-2017 \fB<v\.nicosia@qmul\.ac\.uk>\fR\.