-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsetPercepts.m~
More file actions
39 lines (33 loc) · 2.62 KB
/
setPercepts.m~
File metadata and controls
39 lines (33 loc) · 2.62 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
function percept = setPercepts(inputType, minInterval,maxInterval,numIntervals, ...
inputWidth,outputWidth,fixedLocation,...
memoryWidthUnit,memoryTimeUnit,memoryAmplitude,...
spread_factor,leakage_factor,self_excitation, ...
lognormalIntervals,useBODYMapRepresentation,useBODYBinaryOut)
%
%helper function that sets up the features of the perceptual field that
%experiences the events and where they decay.
%
% we claim that memory is normal distribution that decays analogously to Fitt's law.
% so if width of stdev after K seconds is W, after 2K seconds it will be 2W
% therefore we need to specify a scale for both
if nargin < 1, percept.inputType = 0; else percept.inputType = inputType; end
if nargin < 2, percept.minInterval = 0.1; else percept.minInterval = minInterval; end
if nargin < 3, percept.maxInterval = 90; else percept.maxInterval = maxInterval; end
if nargin < 4, percept.numIntervals = 40; else percept.numIntervals = numIntervals; end
if nargin < 5, percept.inputWidth = 41; else percept.inputWidth = inputWidth; end
if nargin < 6, percept.outputWidth = 10; else percept.outputWidth = outputWidth; end
if nargin < 7, percept.fixedLocation = true; else percept.fixedLocation = fixedLocation; end
if nargin < 8, percept.memoryWidthUnit = 5; else percept.memoryWidthUnit = memoryWidthUnit; end % W
if nargin < 9, percept.memoryTimeUnit = 20; else percept.memoryTimeUnit =20; end % K
if nargin < 10, percept.memoryAmplitude = 0.1; else percept.memoryAmplitude = 10; end
if nargin < 11, percept.spread_factor = 0.1; else percept.spread_factor = spread_factor; % visual
if nargin < 12, percept.leakage_factor = 0.1; else percept.leakage_factor = 0.0105;
if nargin < 13, percept.self_excitation = 0.1; else percept.self_excitation = 0.001;
if nargin < 14, percept.lognormalIntervals = 0; else percept.lognormalIntervals = lognormalIntervals;
if nargin < 15, percept.UseBODYMapRepresentation =true; else percept.UseBODYMapRepresentation = true;
if nargin < 16, percept.UseBODYbinaryout = false; else percept.UseBODYbinaryout = false;
%have set up the basic parameters now generate a set of gaussian curves.
[percept.Intervals, percept.MemoryCurves] = getFadingGaussians(percept);
%and the corresponding expected outputs
percept.ATOMOutputs = ATOMrepresentation(percept.Intervals',outputWidth,minInterval, maxInterval);
percept.BODYOutputs = BODYMapRepresentation(percept.Intervals',outputWidth,minInterval, maxInterval,false,percept.UseBODYbinaryout);