Presentation is loading. Please wait.

Presentation is loading. Please wait.

Trained Perceptron Demonstration

Similar presentations


Presentation on theme: "Trained Perceptron Demonstration"— Presentation transcript:

1 Trained Perceptron Demonstration
Langston, Cognitive Psychology Trained Perceptron Demonstration

2 Trained Perceptron I trained the following perceptron on the category “good fruit” defined as anything with edible skin and seeds. We’ll show it various fruits and have it categorize them as good or bad fruits to see how it performs.

3 Trained Perceptron Remember our features: For output: Good_Fruit = 1
Not_Good_Fruit = 0 Taste Sweet = 1, Not_Sweet = 0 Seeds Edible = 1, Not_Edible = 0 Skin

4 Trained Perceptron Problem space: Banana Pear Lemon Strawberry
Green apple Taste 1 Seeds Skin Good fruit?

5 Trained Perceptron Here is the trained perceptron: Input Taste 0.0
If ∑ > 0.4 then fire 0.0 0.25 Input Output Taste Seeds Skin

6 Models of Semantic Memory
Contrast it to the leading symbolic model. Collins & Loftus (1975, p. 412)

7 Trained Perceptron The knowledge is in the weights on the links (rather than in the nodes): If ∑ > 0.4 then fire 0.0 0.25 Input Output Taste Seeds Skin

8 Trained Perceptron The way it works is: You show it an example.
If the feature has a value of 1, that is multiplied by the weight and put in the sum. If the value is zero, it won’t add to the sum because 0 times anything = 0. Add up all of the products of multiplying features times weights.

9 Trained Perceptron The way it works is:
Once you have a sum, you compare that to some threshold for responding. If the sum is larger than the threshold, respond “yes.” If the sum is smaller than the threshold, respond “no.” Let’s look at the perceptron and classify our fruits.

10 Trained Perceptron Show it a banana: Input 1 1 Taste 0.0 Output 0.25 1
.00 Seeds 1 0.25 If ∑ > 0.4 then fire Skin

11 Trained Perceptron Show it a banana: Input 1 1 Taste 0.0 Output 0.25 1
Seeds 1 0.25 If ∑ > 0.4 then fire Skin

12 Trained Perceptron Show it a banana: Input 1 1 Taste 0.0 Output 0.25 1
Seeds 1 0.25 If ∑ > 0.4 then fire Skin

13 Trained Perceptron Show it a banana: Input 1 1 Taste 0.0 Output 0.25 1
Seeds 1 0.25 If ∑ > 0.4 then fire Skin

14 Trained Perceptron In this case we have: It adds up to 0.25.
(1 X 0) = 0 + (1 X 0.25) = 0.25 + (0 X 0.25) = 0 It adds up to 0.25. Since that is less than the threshold (0.40), we responded “no.” Is that correct?

15 Trained Perceptron Show it a pear: Input 1 1 Taste 0.0 Output 0.25 .00
.00 Seeds 0.25 If ∑ > 0.4 then fire 1 Skin 1

16 Trained Perceptron Show it a pear: Input 1 1 Taste 0.0 Output 0.25 .00
.00 Seeds 0.25 If ∑ > 0.4 then fire 1 Skin 1

17 Trained Perceptron Show it a pear: Input 1 1 Taste 0.0 Output 0.25 .25
.25 Seeds 0.25 If ∑ > 0.4 then fire 1 Skin 1

18 Trained Perceptron Show it a pear: Input 1 1 Taste 0.0 Output 0.25 .25
.25 Seeds 0.25 If ∑ > 0.4 then fire 1 Skin 1

19 Trained Perceptron In this case we have: It adds up to 0.25.
(1 X 0) = 0 + (0 X 0.25) = 0 + (1 X 0.25) = 0.25 It adds up to 0.25. Since that is less than the threshold (0.40), we responded “no.” Is that correct?

20 Trained Perceptron Show it a lemon: Input Taste 0.0 Output 0.25 .00
Taste 0.0 Output 0.25 .00 Seeds 0.25 If ∑ > 0.4 then fire Skin

21 Trained Perceptron Show it a lemon: Input Taste 0.0 Output 0.25 .00
Taste 0.0 Output 0.25 .00 Seeds 0.25 If ∑ > 0.4 then fire Skin

22 Trained Perceptron Show it a lemon: Input Taste 0.0 Output 0.25 .00
Taste 0.0 Output 0.25 .00 Seeds 0.25 If ∑ > 0.4 then fire Skin

23 Trained Perceptron Show it a lemon: Input Taste 0.0 Output 0.25 .00
Taste 0.0 Output 0.25 .00 Seeds 0.25 If ∑ > 0.4 then fire Skin

24 Trained Perceptron In this case we have: It adds up to 0.00.
(0 X 0) = 0 + (0 X 0.25) = 0 It adds up to 0.00. Since that is less than the threshold (0.40), we responded “no.” Is that correct?

25 Trained Perceptron Show it a strawberry: Input 1 1 Taste 0.0 Output
0.25 1 .00 Seeds 1 0.25 If ∑ > 0.4 then fire 1 Skin 1

26 Trained Perceptron Show it a strawberry: Input 1 1 Taste 0.0 Output
0.25 1 .25 Seeds 1 0.25 If ∑ > 0.4 then fire 1 Skin 1

27 Trained Perceptron Show it a strawberry: Input 1 1 Taste 0.0 Output
0.25 1 .50 Seeds 1 0.25 If ∑ > 0.4 then fire 1 Skin 1

28 Trained Perceptron Show it a strawberry: Input 1 1 Taste 0.0 Output
0.25 1 .50 Seeds 1 1 0.25 If ∑ > 0.4 then fire 1 Skin 1

29 Trained Perceptron In this case we have: It adds up to 0.50.
(1 X 0) = 0 + (1 X 0.25) = 0.25 It adds up to 0.50. Since that is greater than the threshold (0.40), we responded “yes.” Is that correct?

30 Trained Perceptron Show it a green apple: Input Taste 0.0 Output 0.25
Taste 0.0 Output 0.25 .00 Seeds 0.25 If ∑ > 0.4 then fire 1 Skin 1

31 Trained Perceptron Show it a green apple: Input Taste 0.0 Output 0.25
Taste 0.0 Output 0.25 .00 Seeds 0.25 If ∑ > 0.4 then fire 1 Skin 1

32 Trained Perceptron Show it a green apple: Input Taste 0.0 Output 0.25
Taste 0.0 Output 0.25 .25 Seeds 0.25 If ∑ > 0.4 then fire 1 Skin 1

33 Trained Perceptron Show it a green apple: Input Taste 0.0 Output 0.25
Taste 0.0 Output 0.25 .25 Seeds 0.25 If ∑ > 0.4 then fire 1 Skin 1

34 Trained Perceptron In this case we have: It adds up to 0.25.
(0 X 0) = 0 + (0 X 0.25) = 0 + (1 X 0.25) = 0.25 It adds up to 0.25. Since that is less than the threshold (0.40), we responded “no.” Is that correct?

35 Trained Perceptron Using the perceptron we can correctly categorize each of the fruit examples we looked at. The next question is “How did we get the weights that represent its knowledge of the category?” Look at the perceptron learning demonstration for that…

36 End Trained Perceptron Demonstration


Download ppt "Trained Perceptron Demonstration"

Similar presentations


Ads by Google