previous up
Left: COGS Home Page Up: COGS Home Page

0
School of Cognitive and Computing Sciences

First Year School Course -- CG019

COGNITIVE MODELLING

Computer Class Week 4: Summer Term 2002

Benedict du Boulay and Steve Torrance
\fbox{\box0}

CONNECTIONISM

By the end of this exercise you should understand how a particular neural network behaves and is trained and have some appreciation of the way its behaviour is affected by the number of hidden units and the size of the training set.

The purpose of this exercise is to give you a brief experience of training and testing a neural network to recognise English words. The network implemented by David Young (COGS) is a three layer feed-forward network similar to that described on page 36 of [G$^+$98].

At the Unix prompt type
pop11 $<RETURN>$
load ~bend/wordrec.p $<RETURN>$note that the character before bend is a tilde
wordrec(); $<RETURN>$

The program will ask you a series of questions about the net you will train. For the first exercise simply press $<RETURN>$to accept the default settings and then test what the network has learned e.g.

Type numbers followed by return, or just return to accept the default
Number of letters in each word (5):
Number of different real words to train on (500):
Number of random "words" to train on (500):
Number of examples to show to the net in training (2000):
Number of units in the net's hidden layer (20):
Initial weight range for net (0.5):
Learning rate constant for net (0.5):
Momentum constant for net (0.9):

Reading the words and training the net now ...
 ... done.
The first 40 training words, marked as + or - examples, were:
    agony+ offal+ tkqbr- whmvt- asher+ kaamt- gngpu- ttqmc- faber+ wstki-
    akyli- cprqq- swiss+ estes+ midge+ exact+ blair+ zqpgp- xmefi- acton+
    arena+ drown+ supra+ eppis- linen+ chirp+ sjfhv- xplou- axial+ rlsut-
    krnnc- wylie+ hotel+ bineb- cohen+ kwgwc- ndbry- bobby+ jomet- dwypv-

Test the net ...

Enter a word with 5 letters (or RETURN to quit): offal
   The word offal scores 0.732206 in favour, and 0.264867 against

Enter a word with 5 letters (or RETURN to quit): okkly
   The word okkly scores 0.000437 in favour, and 0.999486 against

Enter a word with 5 letters (or RETURN to quit):
:
See how the behaviour of the system changes as you vary the parameters, e.g. the number of hidden units, the size of the training set etc. Make sure to logout from Unix before leaving the terminal by clicking the EXIT icon on the screen.

Bibliography

G$^+$98
David W. Green et al.
Cognitive Science, An Introduction.
Blackwell, Oxford, 1998.
QZ 1000 Cog.

---------------------------------------------------------

previous up
Left: COGS Home Page Up: COGS Home Page
Benedict du Boulay, Cognitive Modelling web pages updated on Thursday 9 May 2002