-
Notifications
You must be signed in to change notification settings - Fork 36
/
Copy pathsimil.gplot
140 lines (120 loc) · 3.52 KB
/
simil.gplot
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
# set term png small color
#################################################
# This config used to generate the figure shown in Diary Part Five
#
# set term png
# set out 'sim-mi.png'
set term postscript eps enhanced color 20
set out 'sim-mi.eps'
set key right top
set title "MI Similarity"
set xlabel "MI (bits)"
set ylabel "Frequency"
set logscale y
set format y "10^{%L}"
set yrange [1.0e-4:0.3]
nbins = 200.0
width = 30
nwords = 19925.
scale = nbins/(width*nwords)
# Normal distribution
mu = -1
sigma=2.5
g(x) = exp(-(x-mu)**2/(2*sigma**2))/(sigma * sqrt(2*3.14159))
plot "sim-mi.dat" using 2:($3*scale) with lines lw 2 title "data", \
"sim-mi.dat" using 2:(g($2)) with lines lw 2 title "G(-1,2.5)"
#################################################
# This config used to generate the figure shown in Diary Part Five
#
# set term png
# set out 'sim-rmi.png'
set term postscript eps enhanced color 20
set out 'sim-rmi.eps'
set key right top
set title "Ranked-MI Similarity"
set xlabel "MI (bits)"
set ylabel "Frequency"
set logscale y
set format y "10^{%L}"
set yrange [1.0e-4:0.3]
nbins = 200.0
width = 30
nwords = 19925.
scale = nbins/(width*nwords)
# Normal distribution
mu = 1.5
sigma=2.5
g(x) = exp(-(x-mu)**2/(2*sigma**2))/(sigma * sqrt(2*3.14159))
plot "sim-rmi.dat" using 2:($3*scale) with lines lw 2 title "data", \
"sim-rmi.dat" using 2:(g($2)) with lines lw 2 title "G(1.5,2.5)"
#################################################
# This config used to generate the figure shown in Diary Part Five
#
# set term png
# set out 'sim-hmi.png'
set term postscript eps enhanced color 20
set out 'sim-hmi.eps'
set key left top
set title "H-MI Similarity"
set xlabel "MI (bits)"
set ylabel "Frequency"
set logscale y
set format y "10^{%L}"
set yrange [1.0e-4:0.3]
nbins = 200.0
width = 30
nwords = 19925.
scale = nbins/(width*nwords)
# Normal distribution
mu = 19
sigma=2.5
g(x) = exp(-(x-mu)**2/(2*sigma**2))/(sigma * sqrt(2*3.14159))
plot "sim-hmi.dat" using 2:($3*scale) with lines lw 2 title "data", \
"sim-hmi.dat" using 2:(g($2)) with lines lw 2 title "G(19,2.5)"
#################################################
# This config used to generate the figure shown in Diary Part Five
#
# set term png
# set out 'sim-mmi.png'
set term postscript eps enhanced color 20
set out 'sim-mmi.eps'
set key left top
set title "M-MI Similarity"
set xlabel "MI (bits)"
set ylabel "Frequency"
set logscale y
set format y "10^{%L}"
set yrange [1.0e-4:0.3]
nbins = 200.0
width = 30
nwords = 19925.
scale = nbins/(width*nwords)
# Normal distribution
mu = 5
sigma=2.5
g(x) = exp(-(x-mu)**2/(2*sigma**2))/(sigma * sqrt(2*3.14159))
plot "sim-mmi.dat" using 2:($3*scale) with lines lw 2 title "data", \
"sim-mmi.dat" using 2:(g($2)) with lines lw 2 title "G(5,2.5)"
#################################################
# This config used to generate the figure shown in Diary Part Five
#
# set term png
# set out 'simil-all.png'
set term postscript eps enhanced color 20
set out 'simil-all.eps'
set key right top
set title "Similarity"
set xlabel "MI (bits)"
set ylabel "Frequency"
set logscale y
set format y "10^{%L}"
set yrange [1.0e-4:0.3]
nbins = 200.0
width = 30
nwords = 19925.
scale = nbins/(width*nwords)
plot "sim-mi.dat" using ($2+1):($3*scale) with lines lw 2 title "MI + 1", \
"sim-rmi.dat" using ($2-1.5):($3*scale) with lines lw 2 title "RMI - 1.5", \
"sim-hmi.dat" using ($2-19):($3*scale) with lines lw 2 title "HMI - 19", \
"sim-mmi.dat" using ($2-5):($3*scale) with lines lw 2 title "MMI - 5"
#################################################