Download as pdf or txt
Download as pdf or txt
You are on page 1of 2

Neural Nets∗

USC Linguistics

August 8, 2007

P
i fi wi > threshold → Output = 1, else Output = 0

1 Simple Logical Connectives


and: or: not:

{1,0}*1 {1,0}*1 {1,0}*1 {1,0}*1 {1,0}*-1


+ +

>1.5? >.5? >-.5

or:
and: not:
{1,0}*1 1*-.5 {1,0}*1
{1,0}*1 1*-1.5 {1,0}*1 {1,0}*-1 1*.5
+ +
+ + +
>0?
>0? >0?


Thanks to David Wilczynski whose clear presentation and explicit examplification are emulated here; also Russell
and Norvig’s on-line notes.

1
XOR:
{1,0} {1,0}

*1 *-1 *-1 *1

>0? >0?

{1,0}*1 {1,0}*1

>0?

2 Training
∆w = (C) ∗ Error ∗ f
Error = CorrectAnswer − Output

2.1 or, C=1, threshold=.5


ex. f1 f2 CA w1 w2 f1 w1 + f2 w2 Output Error ∆w1 ∆w2
1 0 0 0 0 0 0 0 0 0 0
2 1 0 1 0 0 0 0 1 1 0
3 0 1 1 1 0 0 0 1 0 1
4 1 1 1 1 1 1 1 0 0 0

2.2 or, C=.5, threshold=0


P
ex. f1 f2 f3 CA w1 w2 w3 i fi wi Output Error ∆w1 ∆w2 ∆w3
1 0 0 1 0 0 0 0 0 0 0 0 0 0
2 1 0 1 1 0 0 0 0 0 1 .5 0 .5
3 0 1 1 1 .5 0 .5 .5 1 0 0 0 0
4 1 1 1 1 .5 0 .5 1 1 0 0 0 0
1 0 0 1 0 .5 0 .5 .5 1 -1 0 0 -.5
2 1 0 1 1 .5 0 0 .5 1 0 0 0 0
3 0 1 1 1 .5 0 0 0 0 1 0 .5 .5
4 1 1 1 1 .5 .5 .5 1.5 1 0 0 0 0
1 0 0 1 0 .5 .5 .5 .5 1 -1 0 0 -.5
2 1 0 1 1 .5 .5 0 .5 1 0 0 0 0
3 0 1 1 1 .5 .5 0 .5 1 0 0 0 0
4 1 1 1 1 .5 .5 0 1 1 0 0 0 0
1 0 0 1 0 .5 .5 0 0 0 0 0 0 0
2 1 0 1 1 .5 .5 0 .5 1 0 0 0 0
3 0 1 1 1 .5 .5 0 .5 1 0 0 0 0
4 1 1 1 1 .5 .5 0 1 1 0 0 0 0

You might also like