-
Notifications
You must be signed in to change notification settings - Fork 36
/
Copy pathdjmi.gplot
56 lines (48 loc) · 1.92 KB
/
djmi.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
# set term png small color
#################################################
#
set term png
set out 'r4-djmi.png'
# set term postscript eps enhanced color 20
# set out 'r4-djmi.eps'
set key left top
set title "MI Distribution of word-dj Pairs"
set xlabel "MI"
set ylabel "Frequency"
set xrange [-8:21]
set logscale y
set format y "10^{%L}"
set yrange [1e-6:1]
g(x,m,s) = (1/sqrt(2*3.14159*s)) * exp(- (x-m)**2 / (2*s**2))
norm000 = 1.0 / 28436901
norm111 = 1.0 / 2049074
norm222 = 1.0 / 622378
norm522 = 1.0 / 556413
norm1042 = 1.0 / 356298
plot "r4-sect-mi-0-0-0.dat" using 2:(norm000 * $3) with lines lw 2 title "trim-0-0-0", \
"r4-sect-mi-1-1-1.dat" using 2:(norm111 * $3) with lines lw 2 title "trim-1-1-1", \
"r4-sect-mi-2-2-2.dat" using 2:(norm222 * $3) with lines lw 2 title "trim-2-2-2", \
"r4-sect-mi-5-2-2.dat" using 2:(norm522 * $3) with lines lw 2 title "trim-5-2-2", \
"r4-sect-mi-10-4-2.dat" using 2:(norm1042 * $3) with lines lw 2 title "trim-10-4-2", \
"r4-sect-mi-2-2-2.dat" using 2:(0.05*g($2,6,3)) with lines lw 2 title "Gauss(6,3)"
#################################################
#
set term png
set out 'r4-djmi-weighted.png'
# set term postscript eps enhanced color 20
# set out 'r4-djmi-weighted.eps'
set key right top
set title "Weighted MI Distribution of word-dj Pairs"
set xlabel "MI"
set ylabel "Frequency"
# set xrange [-12:27]
set logscale y
set format y "10^{%L}"
# set yrange [4e-8:5e-2]
plot "r4-wei-mi-0-0-0.dat" using 2:3 with lines lw 2 title "trim-0-0-0", \
"r4-wei-mi-1-1-1.dat" using 2:3 with lines lw 2 title "trim-1-1-1", \
"r4-wei-mi-2-2-2.dat" using 2:3 with lines lw 2 title "trim-2-2-2", \
"r4-wei-mi-5-2-2.dat" using 2:3 with lines lw 2 title "trim-5-2-2", \
"r4-wei-mi-10-4-2.dat" using 2:3 with lines lw 2 title "trim-10-4-2"
# "pair-fmi.dat" using 2:(0.04*g($2,0.4,2)) with lines lw 2 title "Gauss(0.4,2)", \
#################################################