OverviewFilesCommitsIssuesDocsReleasesPeers

opencog-learn / learn-lang-diary / en-sims / bin-again.gplot

148 lines · gplot ref:
# set term png small color
# set term png small
# set out 'binned.png'

#################################################
# Used to generate the binned average observations
#
set term postscript eps enhanced color 28
set out 'binned-sims-dj-cosine.eps'
set xrange [0:1]
set yrange [1:]
set logscale y
set format y "10^{%L}"
set title "Cosine Similarity from Disjuncts"
set xlabel "Cosine Similarity"
set ylabel "Number of pairs of words"
plot "binned-sims-dj-cosine.dat" using 2:3 with lines linewidth 5 title "", \
     "binned-sims-dj-cosine.dat" using 2:(6e2*exp(-5*$2)) with lines linewidth 5 \
      title "exp(-5 cos)"

#################################################

# Used to generate the binned average observations
#
set term postscript eps enhanced color 28
set out 'binned-sims-dj-mi.eps'
set xrange [-20:10]
set yrange [1:20000]
set logscale y
set format y "10^{%L}"
set key left
set title "Entropic Similarity from Disjuncts"
set xlabel "Entropic Similarity"
set ylabel "Number of pairs of words"
plot "binned-sims-dj-mi.dat" using 2:3 with lines linewidth 5 title "", \
     "binned-sims-dj-mi.dat" using \
     2:(5e3*exp(-0.5*($2+3.5)*($2+3.5)/(3*3))) \
     with lines linewidth 5 title "exp(-0.5(x+3.5)^2/9)"

#################################################
# Used to generate the binned average observations
#
set term postscript eps enhanced color 28
set out 'scatter-dj-cos-mi.eps'
set xrange [1e-6:1]
set logscale x
set format x "10^{%L}"
set yrange [-15:10]
set title "Similarity from Disjuncts"
set ylabel "Entropic Similarity"
set xlabel "Cosine"
plot "ranked-dj-cos-sims.dat" using 2:3 with lines linewidth 5 title ""

#################################################
# Used to generate the binned average observations
#
set term postscript eps enhanced color 28
set out 'scatter-dj-mi-cos.eps'
set xrange [-15:10]
set yrange [1e-6:1]
set format y "10^{%L}"
set logscale y
set title "Similarity from Disjuncts"
set xlabel "Entropic Similarity"
set ylabel "Cosine Similarity"
plot "ranked-dj-640-mi-sims.dat" using 3:2 with lines title ""

#################################################
# Used to generate the binned average observations
#
set term postscript eps enhanced color 28
set out 'scatter-dj-cos-mi-dots.eps'
set xrange [1e-6:1]
set logscale x
set format x "10^{%L}"
set yrange [-15:10]
set title "Similarity from Disjuncts"
set ylabel "Entropic Similarity"
set xlabel "Cosine"
set style data points
plot "ranked-dj-cos-sims.dat" using 2:3 with dots title ""

#################################################
# Used to generate the binned average observations
#
set term postscript eps enhanced color 28
set out 'scatter-dj-mi-cos-dots.eps'
set xrange [-15:10]
set yrange [1e-6:1]
set format y "10^{%L}"
set logscale y
set title "Similarity from Disjuncts"
set xlabel "Entropic Similarity"
set ylabel "Cosine Similarity"
plot "ranked-dj-cos-sims.dat" using 3:2 with dots title ""

#################################################
# Used to generate the binned average observations
#
set term postscript eps enhanced color 28
set out 'ranked-dj-mi.eps'
set logscale x
set format x "10^{%L}"
set yrange [-10:11]
set title "Entropic Similarity from Disjuncts"
set ylabel "Entropic Similarity"
set xlabel "Rank"
plot "ranked-dj-mi-sims.dat" using 1:2 with lines linewidth 5 title "", \
     "ranked-dj-mi-sims.dat" using \
      1:(10.2 - log(sqrt($1))/ log(2.0)) \
      with lines linewidth 5 title "10.2 - 0.5 log_2(rank)"

#################################################
# Used to generate the binned average observations
#
set term postscript eps enhanced color 28
set out 'ranked-dj-cos.eps'
set logscale x
set format x "10^{%L}"
set yrange [0:1]
set key left bottom
set title "Cosine Similarity from Disjuncts"
set ylabel "Cosine Similarity"
set xlabel "Rank"
plot "ranked-dj-cos-sims.dat" using 1:2 with lines linewidth 5 title "", \
     "ranked-dj-cos-sims.dat" using \
      1:(1-(log($1)*log($1)/140)) \
      with lines linewidth 5 title "1 - log(rank)^2/140"

#################################################
# Used to generate the binned average observations
#
set term postscript eps enhanced color 28
set out 'ranked-dj-log-cos.eps'
set logscale x
set format x "10^{%L}"
set yrange [-8:0]
set key left bottom
set title "Cosine Similarity from Disjuncts"
set ylabel "Log_{2} Cosine Similarity"
set xlabel "Rank"
plot "ranked-dj-cos-sims.dat" using 1:(log($2)/0.69315) with lines linewidth 5 title "", \
     "ranked-dj-cos-sims.dat" using \
      1:(log(1-(log($1)*log($1)/140))/0.69315) \
      with lines linewidth 5 title "log_2(1 - log(rank)^2/140)"

#################################################