-
How to generate Network Navigator from ftree file. Thank you very much. |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments
-
Hi! The specification for the ftree format can be found here: https://www.mapequation.org/infomap/#OutputTree Are you using Infomap? Then you can use the from infomap import Infomap
im = Infomap(ftree=True) If you want to generate an ftree file from another source than Infomap, then it's a bit more work. Here's an example, for the karate club network on Infomap Online, we get the following file: # v2.6.1
# ./Infomap karate . --clu --ftree
# started at 2023-02-01 15:37:10
# completed in 0.047 s
# partitioned into 2 levels with 3 top modules
# codelength 4.08742 bits
# relative codelength savings 11.7951%
# flow model undirected
# path flow name node_id
1:1 0.103896 "33" 33
1:2 0.0822511 "32" 32
1:3 0.0454545 "23" 23
1:4 0.0454545 "31" 31
1:5 0.0367965 "8" 8
1:6 0.030303 "25" 25
1:7 0.0281385 "27" 27
1:8 0.0281385 "29" 29
1:9 0.0238095 "30" 30
1:10 0.0151515 "15" 15
1:11 0.0151515 "24" 24
1:12 0.012987 "26" 26
1:13 0.012987 "28" 28
1:14 0.0108225 "14" 14
1:15 0.0108225 "22" 22
1:16 0.00865801 "20" 20
1:17 0.00649351 "9" 9
1:18 0.00649351 "18" 18
2:1 0.0909091 "0" 0
2:2 0.0714286 "2" 2
2:3 0.0627706 "1" 1
2:4 0.038961 "3" 3
2:5 0.0367965 "13" 13
2:6 0.0281385 "7" 7
2:7 0.0108225 "19" 19
2:8 0.00865801 "12" 12
2:9 0.00865801 "21" 21
2:10 0.00649351 "11" 11
2:11 0.00649351 "17" 17
3:1 0.030303 "5" 5
3:2 0.0281385 "6" 6
3:3 0.017316 "4" 4
3:4 0.017316 "10" 10
3:5 0.012987 "16" 16
*Links undirected
#*Links path enterFlow exitFlow numEdges numChildren
*Links root 0 0 2 3
2 1 0.0952381
2 3 0.047619
*Links 1 0.047619 0.047619 35 18
2 1 0.021645
3 1 0.017316
3 2 0.021645
3 6 0.021645
3 7 0.017316
3 8 0.012987
4 1 0.017316
4 2 0.017316
5 1 0.017316
5 2 0.012987
5 9 0.012987
6 4 0.030303
7 1 0.017316
8 1 0.00865801
8 2 0.017316
9 1 0.012987
9 2 0.012987
10 1 0.017316
10 2 0.012987
11 4 0.00865801
11 6 0.00865801
11 7 0.012987
12 1 0.00865801
12 8 0.017316
13 1 0.00865801
13 4 0.00865801
14 1 0.00865801
14 2 0.012987
15 1 0.012987
15 2 0.00865801
16 1 0.004329
16 2 0.012987
17 1 0.00865801
18 1 0.00865801
18 2 0.004329
*Links 2 0.0714286 0.0714286 23 11
1 2 0.021645
1 3 0.017316
1 4 0.012987
1 5 0.012987
1 6 0.00865801
1 7 0.00865801
1 8 0.004329
1 9 0.00865801
1 10 0.012987
1 11 0.00865801
2 4 0.012987
2 5 0.012987
2 6 0.017316
3 2 0.025974
3 4 0.012987
3 5 0.021645
3 6 0.017316
3 7 0.00865801
3 9 0.00865801
3 11 0.004329
4 5 0.012987
4 6 0.012987
4 8 0.012987
*Links 3 0.0238095 0.0238095 6 5
1 2 0.021645
1 4 0.012987
1 5 0.012987
2 5 0.012987
3 2 0.00865801
3 4 0.012987 |
Beta Was this translation helpful? Give feedback.
-
Thank you very much, the problem has been solved |
Beta Was this translation helpful? Give feedback.
Hi!
The specification for the ftree format can be found here: https://www.mapequation.org/infomap/#OutputTree
Are you using Infomap? Then you can use the
--ftree
or--output ftree
option.In the Python API, you use
If you want to generate an ftree file from another source than Infomap, then it's a bit more work.
Here's an example, for the karate club network on Infomap Online, we get the following file: