{"id":147,"date":"2012-08-10T15:11:11","date_gmt":"2012-08-10T19:11:11","guid":{"rendered":"http:\/\/www.michelecoscia.com\/?page_id=147"},"modified":"2012-08-14T18:44:10","modified_gmt":"2012-08-14T22:44:10","slug":"multidimensional-network-analysis","status":"publish","type":"page","link":"https:\/\/www.michelecoscia.com\/?page_id=147","title":{"rendered":"Multidimensional Network Analysis"},"content":{"rendered":"<p style=\"text-align: center;\">Implemented by <a href=\"http:\/\/www.di.unipi.it\/~aorlandi\/\">Alessio Orlandi<\/a> (Java) and me (Python)<\/p>\n<p style=\"text-align: center;\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-medium wp-image-149\" title=\"mna\" src=\"http:\/\/www.michelecoscia.com\/wp-content\/uploads\/2012\/08\/mna-282x300.png\" alt=\"\" width=\"282\" height=\"300\" \/><\/p>\n<p style=\"text-align: left;\"><strong>Paper<\/strong><\/p>\n<p style=\"text-align: left;\">This page provides two different implementations of the multidimensional network analysis framework that is described in <a href=\"http:\/\/www.michelecoscia.com\/wp-content\/uploads\/2012\/08\/foundations.pdf\">this paper<\/a>.<\/p>\n<p style=\"text-align: left;\"><strong>Download<\/strong><\/p>\n<p style=\"text-align: left;\">The Java implementation (<a href=\"http:\/\/www.michelecoscia.com\/wp-content\/uploads\/2012\/08\/mna_java.zip\">download<\/a>) is a larger JAR file (14 MB) without source code. It implements more functions (for example, it prints the cumulative distributions of the Dimension Relevance or it accepts as input an arc labelled graph, such as the one used for storing the <a href=\"http:\/\/law.di.unimi.it\/datasets.php\">UK Union web dataset<\/a>). More\u00a0importantly, it is WAY FASTER than the Python implementation: I didn&#8217;t test it rigorously, but it should be 4x faster than the alternative.<\/p>\n<p style=\"text-align: left;\">The Python implementation (<a href=\"http:\/\/www.michelecoscia.com\/wp-content\/uploads\/2012\/08\/mna_py.zip\">download<\/a>) is much simpler (2 KB), and it is designed for people who want to edit the code and adapt it to their own necessities. It is not slow in absolute terms (it can process around 3.5 million edges in 20 seconds on a dual core i7 64 bits @ 2.8\u00a0GHz, more or less), but of course it&#8217;s not C++.<\/p>\n<p style=\"text-align: left;\"><strong>Instructions<\/strong><\/p>\n<p style=\"text-align: left;\">The shared flags between the two implementations are the following:<\/p>\n<p style=\"text-align: left;\">-f: Specifies the path of the network input file.<\/p>\n<p style=\"text-align: left;\">-d: Specifies the directory containing ONLY network files in the same format and with the same number of dimensions.<\/p>\n<p style=\"text-align: left;\">-D: Specified the number of dimensions.<\/p>\n<p style=\"text-align: left;\">-e: Use extended format (edgelist with an &#8220;e&#8221; as first field, then &#8220;node node dimension&#8221;) compatible with gSpan format. Otherwise the simple edgelist (node node dimension) is used.<\/p>\n<p style=\"text-align: left;\">-n: Print the node stats (zipped).<\/p>\n<p style=\"text-align: left;\">-i: Print the dimension stats.<\/p>\n<p style=\"text-align: left;\">The other flags only for the Java version are explained in the &#8211;help.<\/p>\n<p style=\"text-align: left;\">So, if we want to analyze the network &#8220;querylog&#8221; with 7 dimensions, in the same directory of the script, in gSpan format and we want only the node statistics we will write:<\/p>\n<p style=\"text-align: left;\">java -jar mna.jar -f querylog -D 7 -e -I -n<\/p>\n<p style=\"text-align: left;\">or<\/p>\n<p style=\"text-align: left;\">python mna.py\u00a0-f querylog -D 7 -e -n<\/p>\n<p style=\"text-align: left;\">Instead, if we want to analyze a bunch of networks in the &#8220;dblp_conf&#8221; directory, each with 31 dimensions, not in gSpan format, requesting for both node and dimension statistics we will write:<\/p>\n<p style=\"text-align: left;\">java -jar mna.jar -d\u00a0dblp_conf -D 31 -I -n -i<\/p>\n<p style=\"text-align: left;\">or<\/p>\n<p style=\"text-align: left;\">python mna.py -d\u00a0dblp_conf -D 31 -n -i<\/p>\n<p style=\"text-align: left;\"><strong>Datasets &amp; Input instruction<\/strong><\/p>\n<p style=\"text-align: left;\">One important input instruction: first, the format requested is either an edgelist (node node dimension), example:<\/p>\n<pre>0 1 1\r\n0 2 1\r\n1 2 3<\/pre>\n<p style=\"text-align: left;\">or a gSpan edge list:<\/p>\n<pre>e 0 1 1\r\ne 0 2 1\r\ne 1 2 3<\/pre>\n<p>Second, and more important: the edges are required to be sorted. So the following is a correct edgelist:<\/p>\n<pre>0 1 1\r\n0 1 2\r\n0 2 1\r\n1 2 3<\/pre>\n<div>while the following is not:<\/div>\n<pre>0 1 1\r\n0 2 1\r\n0 1 2\r\n1 2 3<\/pre>\n<p>Two datasets are available:<\/p>\n<ul>\n<li>DBLP Conf (<a href=\"http:\/\/www.michelecoscia.com\/wp-content\/uploads\/2012\/08\/dblp_conf.zip\">download<\/a>). A co-authorship network extracted from DBLP digital bibliography. Two authors are connected if they co-authored a paper. The conference venue is the dimension for the network. We record 31 conferences and the dimension map is the following:VLDB 0,\u00a0SIGMOD 1,\u00a0PODS 2,\u00a0CIKM 3,\u00a0KDD 4,\u00a0ICDM 5,\u00a0PKDD 6,\u00a0SDM 7,\u00a0IJCAI 8,\u00a0AAAI 9,\u00a0ICML 10,\u00a0ECAI 11,\u00a0ACL 12,\u00a0EACL 13,\u00a0NLDB 14,\u00a0SIGIR 15,\u00a0WWW 16,\u00a0ECIR 17,\u00a0WISE 18,\u00a0PPOPP 19,\u00a0PACT 20,\u00a0ICPP 21,\u00a0ICDCS 22,\u00a0ICCV 23,\u00a0CVPR 24,\u00a0ECCV 25, \u00a0CGI 26,\u00a0ACM-MM 27,\u00a0ICME 28,\u00a0MMM 29,\u00a0MoMM 30.The id-&gt;author map is included in the zip file.<\/li>\n<li>Querylog (<a href=\"http:\/\/www.michelecoscia.com\/wp-content\/uploads\/2012\/08\/querylog.zip\">download<\/a>). A co-queried network. Nodes are terms connected if they are used together in the same query. This dataset is based on the AOL dataset. There are 6 dimensions. Each dimension represent the rank the user clicked from the results of the query. The dimension map is the following: Rank 1 -&gt; 1, Ranks 2-3 -&gt; 2, Ranks 4-6 -&gt; 3, Ranks 7-10 -&gt; 4, Ranks 11-58 -&gt; 5, Ranks 59-500 -&gt; 6.\u00a0The id-&gt;word map is included in the zip file.<\/li>\n<\/ul>\n<p>Happy multidimensional analysis!<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Implemented by Alessio Orlandi (Java) and me (Python) Paper This page provides two different implementations of the multidimensional network analysis framework that is described in this paper. Download The Java implementation (download) is a larger JAR file (14 MB) without source code. It implements more functions (for example, it prints the cumulative distributions of the &hellip; <a href=\"https:\/\/www.michelecoscia.com\/?page_id=147\" class=\"more-link\">Continue reading<span class=\"screen-reader-text\"> &#8220;Multidimensional Network Analysis&#8221;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"parent":25,"menu_order":0,"comment_status":"open","ping_status":"closed","template":"","meta":{"footnotes":""},"class_list":["post-147","page","type-page","status-publish","hentry"],"_links":{"self":[{"href":"https:\/\/www.michelecoscia.com\/index.php?rest_route=\/wp\/v2\/pages\/147","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.michelecoscia.com\/index.php?rest_route=\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/www.michelecoscia.com\/index.php?rest_route=\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/www.michelecoscia.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.michelecoscia.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=147"}],"version-history":[{"count":7,"href":"https:\/\/www.michelecoscia.com\/index.php?rest_route=\/wp\/v2\/pages\/147\/revisions"}],"predecessor-version":[{"id":150,"href":"https:\/\/www.michelecoscia.com\/index.php?rest_route=\/wp\/v2\/pages\/147\/revisions\/150"}],"up":[{"embeddable":true,"href":"https:\/\/www.michelecoscia.com\/index.php?rest_route=\/wp\/v2\/pages\/25"}],"wp:attachment":[{"href":"https:\/\/www.michelecoscia.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=147"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}