Hippocampal spiking model for context dependent behavior (Raudies & Hasselmo 2014)

 Download zip file 
Help downloading and running models
Accession:194882
Our model simulates the effect of context dependent behavior using discrete inputs to drive spiking activity representing place and item followed sequentially by a discrete representation of the motor actions involving a response to an item (digging for food) or the movement to a different item (movement to a different pot for food). This simple network was able to consistently learn the context-dependent responses.
Reference:
1 . Raudies F, Hasselmo ME (2014) A model of hippocampal spiking responses to items during learning of a context-dependent task. Front Syst Neurosci 8:178 [PubMed]
Citations  Citation Browser
Model Information (Click on a link to find other models with that property)
Model Type: Realistic Network;
Brain Region(s)/Organism: Hippocampus;
Cell Type(s): Abstract integrate-and-fire leaky neuron;
Channel(s):
Gap Junctions:
Receptor(s):
Gene(s):
Transmitter(s):
Simulation Environment: MATLAB;
Model Concept(s):
Implementer(s): Raudies, Florian [florian.raudies at gmail.com];
/
CodePublished
screenshots
README.html
binariness.m
errorarea.m
Figure3AAndFigure4.m
Figure3BAndFigure5.m
firingRateToSI.m
gpl-3.0.txt *
index2label.m
lifModel.m
ManySlotBuffer.m
meanWoutNaN.m
NetworkSimulation100Runs.mat
rasterPlotToFiringRate.m
semWoutNaN.m
spikingNetworkContextLearning.m
StackContainer.m
stdpModel.m
TimeBuffer.m
                            
classdef TimeBuffer < handle
    % Time buffer -- Is a single buffer for time stamps. The method retire
    % removes all entries which are older than t-nHistory.
    
    %   Florian Raudies, 09/07/2014, Boston University.
    properties
        nEntry      % Number of entries.
        nBuffer     % Number of buffers.
        nHistory    % Time in steps to go back.
        Counter     % Counter for each buffer.
        Buffer      % These are the buffers that hold the time values.
    end
    methods
        % Constructor.
        function obj = TimeBuffer(nEntry,nBuffer,nHistory)
            obj.nEntry      = nEntry;
            obj.nBuffer     = nBuffer;
            obj.nHistory    = nHistory;
            obj.Counter     = zeros(nBuffer,1);
            obj.Buffer      = zeros(nEntry,nBuffer);
        end
        function obj = clear(obj)
            obj.Counter = zeros(obj.nBuffer,1);
            obj.Buffer  = zeros(obj.nEntry,obj.nBuffer);
        end
        % Retire entries.
        function obj = retire(obj,time)
            for iBuffer = 1:obj.nBuffer,
                if obj.Counter(iBuffer)==0, continue; end
                ToRetire = obj.Buffer(1:obj.Counter(iBuffer),iBuffer) < time-obj.nHistory;
                if sum(ToRetire)==0, continue; end
                Index = sum(ToRetire)+1 : obj.Counter(iBuffer);
                if isempty(Index), obj.Counter(iBuffer) = 0; continue; end
                obj.Buffer(1:length(Index),iBuffer) = obj.Buffer(Index,iBuffer);
                obj.Counter(iBuffer) = length(Index);
            end
        end
        % Add time.
        function obj = addTime(obj,time,ToBuffer)
            if any(ToBuffer)
                for iToBuffer = find(ToBuffer),
                    obj.Buffer(1+obj.Counter(iToBuffer),iToBuffer) = time;
                    obj.Counter(iToBuffer) = obj.Counter(iToBuffer) + 1;
                end
            end
        end
        % Retrieve time for iBuffer.
        function Time = time(obj,iBuffer)
            Time = obj.Buffer(1:obj.Counter(iBuffer),iBuffer);
        end
        % Print the contents of the buffer.
        function print(obj)
            for iBuffer = 1:obj.nBuffer,
                fprintf('buffer %d: ',iBuffer);
                for iEntry = 1:obj.Counter(iBuffer),
                    fprintf('%d, ',obj.Buffer(iEntry,iBuffer));
                end
                fprintf('\n');
            end            
        end
    end
end