Cognitive Science Computational modelling

Download Report

Transcript Cognitive Science Computational modelling

Cognitive Science
Computational modelling
Week 3
Linear separability
Configuration files
Reconstructing Cohen’s model of autism
Objectives of this workshop
•
•
•
•
•
To gain more familiarity with Tlearn
To learn how to set up a network in
Tlearn
To train and evaluate a backprop network
learning "Exclusive OR"
To appreciate the difficulty of analysing
network performance
To train and evaluate a backprop network
model of "autism"
"Exclusive OR“ & hidden units
"John is a Tory or John
is a Marxist"
Either Tory, or Marxist,
but not both.
John is a
Tory
Compositional
0
1
0
1
John is a
Marxist
0
0
1
1
John is a Tory or John is a
Marxist
0
1
1
0
Linear separability
• XOR truth table as a graph
– 2 dimensions (one for each input)
– Plot the corresponding target output
Tory
1
0
0
1
Marxist
Exercise
Draw the corresponding graph for ‘and’
e.g.
Sue likes Radiohead and chocolate cake
Is ‘and’ linearly separable?
Number of inputs: 2
Number of hidden: ? two?
Number of outputs: 1
i1, i2
#1, #2
#3
• xor-1501.wts
contains the weights saved after 1501 learning
trials with the set of training patterns
For exercise
follow from p117, Chapter 5
Cohen's model of learning in
autism
• Too many and too few neurons and/or
connections
- Some things hard to learn
- Poor generalisation
• Model looks at effect of
irrelevant inputs
extra hidden units
Happy face
• mouth up
• eyebrows
-1 … 1
0 … -1
(+ve = smile)
(-ve = smile*)
*roughly
See Figure 11.3, but note that the vertical
axis has the wrong values
Reconstructing Cohen
• Re-create input patterns
• Re-create the target for each input pattern
• Put those patterns into .data and .teach
files
• Create configuration file
Input patterns
5 input values in each pattern
1st : mouth
2nd : eyebrow
3rd, 4th, 5th : mimic task-irrelevant features of
the situation
Values for ‘xtra’ inputs
Random numbers
should be noise
easy way to do it is using SPSS
…
then “Save as…” comma delimitted
Overview
• Create training pattern inputs with 5 input
values, n = 16
- and corresponding targets in a .teach file
• Create 8 more in a separate .data file
[why?] nb no .teach file needed for these
• Create configuration file
• Train; every so many trials, test both the
training set & the configuration set
Overview ctd
Do it all again, with just one irrelevant xtra
input
Hint: you only need to make small changes
to some of the files you already have
Overview concluded
Evaluate the results
1.
Quantitatively
error as learning progresses, on training set
error as learning progresses, generalisation
compare results for 1 irrelevant v 3 irrelevant
1.
Qualitatively
Mapping parameters onto theory
eg number of inputs; what does it stand for from the theory
Mapping to cognitive performance
Mapping to biology