$$f(u) = 2\left(\frac{1}{1 + \exp(-bu)}\right)-1$$ $ $ $$ \frac {\partial f(u)}{ \partial u} = \frac {2b \exp(-bu)}{(1 + \exp(-bu))^2} $$ $$= \frac {b}{2} \left[ 1-\left( \frac {1 - \exp(-bu)}{1 + \exp(-bu)} \right)^2 \right] $$ $$= \frac {b} {2} (1 - o^2)$$
where $o = f(u), u = w^Tx$
Hi, can anyone explain to me how does the above bipolar sigmoidal function is differentiated?
Thank you,
$$f(u) = \frac{2}{1 + e^{-bu}}-1$$ $$=\frac{1-e^{-bu}}{1 + e^{-bu}}$$ $$\frac{\partial f(u)}{\partial u} = 2\frac{\partial}{\partial u}(1 + e^{-bu})^{-1} $$ We now set $f(x) = x^{-1} \quad f'(x) = -x^{-2} \quad g(x) =1+e^{-bu} \quad g'(x) = -be^{-bx}$ and apply $[f \circ g]' = g'[f'\circ g]$ $$=\frac{2be^{-bu}}{(1+e^{-bu})^2}$$ $$=\frac{b}{2}\frac{4e^{-bu}}{(1+e^{-bu})^2}$$ $$=\frac{b}{2}\frac{(1+e^{-bu})^2-(1-e^{-bu})^2}{(1+e^{-bu})^2}$$ $$=\frac{b}{2}\left(1-\frac{(1-e^{-bu})^2}{(1+e^{-bu})^2}\right)$$ $$=\frac{b}{2}(1-f(u)^2)$$ This method involved some strange rearrangement of terms (requiring we knew the final answer), so I'll also show a way to get the same method without this knowledge by applying partial fraction decomposition. Applying fraction decomposition immediately after finding the derivative, we get $$=b\left(\frac{2}{1+e^{-bu}}-\frac{2}{(1+e^{-bu})^2}\right)$$ $$=b\left(\frac{2}{1+e^{-bu}}-\frac{2}{1+e^{-bu}}\frac{2}{1+e^{-bu}}\frac{1}{2}\right)$$ $$=b\left([f(u)+1]-[f(u)+1][f(u)+1]\frac{1}{2}\right)$$ $$=\frac{b}{2}\left(2f(u)+2-[f(u)^2+2f(u)+1]\right)$$ $$=\frac{b}{2}\left(1-f(u)^2\right)$$