Problem 2-1 §
(coding problems follow below)
The energy function:
E(v,h;θ)=−(i∑j∑σiWijhjvi−i∑2σi2(vi−bi)2+j∑αjhj)
And the joint distribution p(v,h)=Zexp(−E(v,h))
p(vi=X∣h) §
Isolate terms involving vi:
E(vi,h)=−(j∑σiWijhjvi−2σi2(vi−bi)2)+…=vi(j∑σiWijhj)−2σi2(vi−bi)2=−2σi2(vi−μi)2+…
where
μi=bi+σij∑Wijhj.
And noting Z as the regularization, p(vi∣h)is Gaussian:
p(vi∣h)=2πσi21exp(−2σi2(vi−μi)2).
p(hj=1∣v) §
Isolate terms involving hj:
E(v,hj)=−(i∑σiWijhjvi+αjhj)+…
For hj∈{0,1}:
exp(−E(v,hj))={exp(0),exp(∑iσiWijvi+αj),hj=0hj=1.
Thus the conditional p(hj=1∣v):
p(hj=1∣v)=σ(i∑σiWijvi+αj),
where σ(x)=1+exp(−x)1 is the sigmoid function.