Processing math: 92%

Machine Learning

Stanford Univ, Coursera


Non-linear classification example

AND
x1,x2{0,1}y=x1 AND x2

x1x2 がともに 1 であるときのみ、次のhypothesis 関数の出力は正となる。

Θ(1)=(302020)hΘ(x)=g(30+20x1+20x2)
OR
x1,x2{0,1}y=x1 OR x2hΘ(x)=g(10+20x1+20x2)
NOT
x1{0,1}y=NOT  x1hΘ(x)=g(1020x1)
NAND
x1,x2{0,1}y=x1 NOR x2hΘ(x)=g(3020x120x2)
NOR
x1,x2{0,1}y=x1 NOR x2hΘ(x)=g(1020x120x2)

Non-linear classification example 2

Θ(1)
AND:    Θ(1)=(302020)NOR:    Θ(1)=(102020)OR:    Θ(1)=(102020)

これらの道具を使って XNOR オペレータを作成する。

x1x2XORXNOR
0001
0110
1010
1101
\displaystyle \begin{pmatrix} x_0 \\ x_1 \\ x_2 \end{pmatrix} \longrightarrow \begin{pmatrix} a^{(2)}_0 \\ a^{(2)}_1 \\ \end{pmatrix} \longrightarrow \begin{pmatrix} a^{(3)} \\ \end{pmatrix} \longrightarrow h_{\Theta}(x) \\ \\ {\Theta}^{(1)} = \begin{pmatrix} -30 & 20 & 20 \\ 10 & -20 & -20 \\ \end{pmatrix} \\ \\ {\Theta}^{(2)} = \begin{pmatrix} -10 & 20 & 20 \\ \end{pmatrix} \\ \\ a^{(2)} = g( {\Theta}^{(1)} \cdot \boldsymbol{x} ) \\ a^{(3)} = g( {\Theta}^{(2)} \cdot \boldsymbol{a}^{(2)} ) \\ \boldsymbol{h}_{\Theta} (x) = \boldsymbol{a}^{(3)}
Yoshihisa Nitta

http://nw.tsuda.ac.jp/