#gnuplot{{{ set grid plot tanh(x) replot 1/(1+exp(-x)) }}}
#gnuplot(640,480){{{ set grid plot tanh(x) replot 1/(1+exp(-x)) }}}
#gnuplot(){{{ set grid set arrow 1 from 2.0,3.5 to 3.0,3.5 linewidth 2 linecolor rgb "red" set arrow 2 from 3.0,3.5 to 3.0,2.0 linewidth 2 linecolor rgb "red" set label 1 at first 3.2,3.0 "∂w1" textcolor rgb "red" plot "$attach_data.txt" \ smooth csplines \ title "∂E/∂w1" \ with lines \ linecolor rgbcolor "blue" ---- data.txt # X Y 1.0 5.0 2.0 3.5 3.0 2.0 4.0 1.5 5.0 3.5 }}}
#gnuplot(320,240){{{ set grid set xr[-5:5] set yr[-0.5:2] plot (1/(1+exp(-x)))*(1-1/(1+exp(-x))) title "diff logistic" linecolor rgbcolor "red" replot 1-tanh(x)*tanh(x) title "diff hypabolic" linecolor rgbcolor "blue" }}}
値域が違う関数を並べて表示するときには、yr が必要。ないと
#gnuplot(640,240){{{ set grid set xr[0:1] set ylabel "KL(0.3|x)" set xlabel "x" plot 0.3*log(0.3/x) + (1-0.3)*log((1-0.3)/(1-x)) title "kullback leibler divergence" }}}