$$x_1$$
$$w_1$$
$$x_2$$
$$x_3$$
$$y_1$$
$$\sigma$$
$$w_2$$
$$w_3$$
https://cdn.vectorstock.com/i/composite/12,25/neuron-cell-vector-81225.jpg
soma
dendrite
axon
synapse
fires if visual is funny
fires if speech style is funny
fires if text is funny
fires if at least 2 of 3 inputs fired
________________________________________
face
nose
mouth
eyes
|
---|
\(y=f(g(x)) = 1\) if \(g(x) \geq \theta\)
\(= 0\) if \(g(x) < \theta\)
3
1
0
1
0
1
2
0
1
OR
\(x_1 + x_2 + x_3= \theta = 1\)
|
---|
|
---|
$$x_1$$
$$x_2$$
$$x_n$$
$$y$$
$$w_1$$
$$w_2$$
$$w_n$$
$$..$$
$$..$$
$$..$$
$$..$$
$$x_0=1$$
$$w_0=-\theta$$
$$x_1$$
$$w_1$$
$$x_2$$
$$x_n$$
$$w_2$$
$$w_n$$
$$..$$
$$..$$
$$..$$
$$..$$
$$y$$
$$x_1$$
$$w_1$$
$$x_2$$
$$y$$
$$w_2$$
$$w_3$$
$$x_0=1$$
$$w_0=-\theta$$
$$x_3$$
$$x_1$$
$$w_1$$
$$x_2$$
$$y$$
$$w_2$$
$$w_3$$
$$x_0=1$$
$$w_0=-\theta$$
$$x_3$$
\(x_1\)
\(x_2\)
OR
\(0\)
\(1\)
\(0\)
\(1\)
\(0\)
\(0\)
\(1\)
\(1\)
\(0\)
\(1\)
\(1\)
\(1\)
\(-1\)
\(-1\)
\(1\)
\(1.5\)
\(0\)
\(1\)
\(10\)
\(-10\)
\(2\)
...
...
(scaled to 0 to 1)
(scaled to 0 to 1)
$$w_1$$
$$w_2$$
$$w_n$$
$$..$$
$$..$$
$$w_0=-\theta$$
$$x_1$$
$$x_2$$
$$x_n$$
$$y$$
$$..$$
$$..$$
$$x_0=1$$
\(P \gets\) \(inputs\) \(with\) \(label\) \(1\);
\(N \gets\) \(inputs\) \(with\) \(label\) \(0\);
Initialize \(\text w\) randomly;
while \(!convergence\) do
Pick random \(\text x\) \(\isin\) \( P\) \(\cup\) \( N\) ;
\(\text w\) = \(\text w\) \(+\) \(\text x\) ;
end
end
//the algorithm converges when all the inputs
are classified correctly
if \(\text x\) \(\isin\) \(\text P\) \(and\) \(\sum_{i=0}^{n}\ w_i*x_i < 0\) then
end
if \(\text x\) \(\isin\) \(\text N\) \(and\) \(\sum_{i=0}^{n}\ w_i*x_i \geq 0\) then
\(\text w\) = \(\text w\) \(-\) \(\text x\) ;
(\(\because\) \(cos \alpha \)= \({w^Tx\over \parallel w \parallel \parallel x \parallel}\) = \(0\))
\(y = 1\) \(if \text w^\text T \text x \geq 0\)
\( = 0\) \(if \text w^\text T \text x < 0\)
\(x_2\)
\(x_1\)
\(p_2\)
\(p_3\)
\(\text w\)
\(p_1\)
\(n_1\)
\(n_2\)
\(n_3\)
\(P \gets\) \(inputs\) \(with\) \(label\) \(1\);
\(N \gets\) \(inputs\) \(with\) \(label\) \(0\);
Initialize \(\text w\) randomly;
while \(!convergence\) do
Pick random \(\text x\) \(\isin\) \( P\) \(\cup\) \( N\) ;
\(\text w\) = \(\text w\) \(+\) \(\text x\) ;
end
end
//the algorithm converges when all the inputs
are classified correctly
if \(\text x\) \(\isin\) \(\text P\) \(and\) \(\sum_{i=0}^{n}\ w_i*x_i < 0\) then
end
if \(\text x\) \(\isin\) \(\text N\) \(and\) \(\sum_{i=0}^{n}\ w_i*x_i \geq 0\) then
\(\text w\) = \(\text w\) \(-\) \(\text x\) ;
\(P \gets\) \(inputs\) \(with\) \(label\) \(1\);
\(N \gets\) \(inputs\) \(with\) \(label\) \(0\);
Initialize \(\text w\) randomly;
while \(!convergence\) do
Pick random \(\text x\) \(\isin\) \( P\) \(\cup\) \( N\) ;
\(\text w\) = \(\text w\) \(+\) \(\text x\) ;
end
end
//the algorithm converges when all the inputs
are classified correctly
if \(\text x\) \(\isin\) \(\text P\) \(and\) \(\sum_{i=0}^{n}\ w_i*x_i < 0\) then
end
if \(\text x\) \(\isin\) \(\text N\) \(and\) \(\sum_{i=0}^{n}\ w_i*x_i \geq 0\) then
\(\text w\) = \(\text w\) \(-\) \(\text x\) ;
\(x_2\)
\(x_1\)
\(p_2\)
\(p_3\)
\(p_1\)
\(n_1\)
\(n_2\)
\(n_3\)
\(x_2\)
\(x_1\)
\(p_2\)
\(p_3\)
\(p_1\)
\(n_1\)
\(n_2\)
\(n_3\)
\(x_2\)
\(x_1\)
\(p_2\)
\(p_3\)
\(p_1\)
\(n_1\)
\(n_2\)
\(n_3\)
\(x_2\)
\(x_1\)
\(p_2\)
\(p_3\)
\(p_1\)
\(n_1\)
\(n_2\)
\(n_3\)
\(x_2\)
\(x_1\)
\(p_2\)
\(p_3\)
\(p_1\)
\(n_1\)
\(n_2\)
\(n_3\)
\(x_2\)
\(x_1\)
\(p_2\)
\(p_3\)
\(p_1\)
\(n_1\)
\(n_2\)
\(n_3\)
\(x_2\)
\(x_1\)
\(p_2\)
\(p_3\)
\(p_1\)
\(n_1\)
\(n_2\)
\(n_3\)
\(x_2\)
\(x_1\)
\(p_2\)
\(p_3\)
\(p_1\)
\(n_1\)
\(n_2\)
\(n_3\)
\(x_2\)
\(x_1\)
\(p_2\)
\(p_3\)
\(p_1\)
\(n_1\)
\(n_2\)
\(n_3\)
\(x_2\)
\(x_1\)
\(p_2\)
\(p_3\)
\(p_1\)
\(n_1\)
\(n_2\)
\(n_3\)
\(x_2\)
\(x_1\)
\(p_2\)
\(p_3\)
\(p_1\)
\(n_1\)
\(n_2\)
\(n_3\)
\(x_2\)
\(x_1\)