BinomialSynapses.jl

Models

BinomialSynapses.AbstractBinomialModelType
AbstractBinomialModel

An abstract type for binomial synaptic models. A binomial model always has the following parameters:

  • N: number of release sites
  • p: probability of release
  • q: quantum of release
  • σ: observation noise
  • τ: refilling time constant
source
BinomialSynapses.BinomialGridModelType
BinomialGridModel(
    Nind, pind, qind, σind, τind,
    Nrng, prng, qrng, σrng, τrng,
    N,    p,    q,    σ,    τ
   )

A binomial model ensemble whose parameters are constrained to live on a grid defined by Nrng, prng, etc.

source
BinomialSynapses.BinomialGridModelMethod
BinomialGridModel(
    Nind, pind, qind, σind, τind,
    Nrng, prng, qrng, σrng, τrng
)

Construct a binomial model ensemble with parameters on a grid, e.g. Nrng, based on choosing indices, e.g. Nind.

source
BinomialSynapses.BinomialGridModelMethod
BinomialGridModel(m_out, my_Nrng, my_prng, my_qrng, my_σrng, my_τrng, device = :gpu)

Randomly initialize a binomial model ensemble with parameters uniformly sampled from the specified grid (on the GPU).

source
Missing docstring.

Missing docstring for BinomialModel(Nmax::Integer, m_out::Integer, device::Symbol = :gpu). Check Documenter's build log for details.

BinomialSynapses.BinomialModelMethod
BinomialModel(m_out, my_Nrng, my_prng, my_qrng, my_σrng, my_τrng)

Randomly initialize a binomial model ensemble on a grid, but throw away the grid info and just keep the parameters.

source
BinomialSynapses.ScalarBinomialModelFunction
ScalarBinomialModel(Nmax, device = :cpu)

Randomly initialize a model ensemble of size 1, which corresponds to a scalar model (used for the hidden state).

source
ScalarBinomialModel(N, p, q, σ, τ, device = :cpu)

Initialize a scalar binomial model with the given parameters.

source
Missing docstring.

Missing docstring for BinomialState(Nmax::Integer, m_out::Integer, m_in::Integer, device::Symbol = :gpu). Check Documenter's build log for details.

BinomialSynapses.ScalarBinomialStateFunction
ScalarBinomialState(Nmax, device = :cpu)

Randomly initialize a state ensemble of size 1, which corresponds to a scalar model (used for the hidden state).

source
ScalarBinomialState(n, k, device = :cpu)

Initialize a scalar state with the specified values of the variables.

source
BinomialSynapses.emitFunction
emit(state, model, timestep)

Return a BinomialObservation based on the current state and model, after a speficied time step timestep.

source
emit(sim, dt)

Emit an EPSP after time step dt.

source

Time steps

BinomialSynapses.TimestepType
Timestep

An abstract type specifying the way a time step is chosen. The following basic types are supported:

  • FixedTimestep: a constant, fixed number is used
  • RandomTimestep: the time step is random from a fixed distribution
  • OEDPolicy: an optimal time step is chosen based on some objective function
source

Particle Filter

BinomialSynapses.NestedParticleStateType
NestedParticleState(state, model)

Construct a particle system (ensemble) consisting of a state ensemble (inner and outer particles) and a model ensemble (outer particles).

source
BinomialSynapses.NestedParticleStateMethod
NestedParticleState(
    m_out, m_in, 
    my_Nrng, my_prng, my_qrng, my_σrng, my_τrng, 
    device = :gpu
)

Construct a randomly initialized particle system with a given number of outer (m_out) and inner (m_in) particles and specified grids for the parameters.

source
BinomialSynapses.jitter!Function
jitter!(model::BinomialGridModel, width)

Apply jitter with parameter width to the indices of a binomial model on a grid.

source
BinomialSynapses.likelihoodFunction
likelihood(state, model::AbstractBinomialModel, obs)

Return the likelihood of an observation conditioned on the current state and model. This broadcasts properly over state and model ensemble, if they have compatible sizes.

source
BinomialSynapses.likelihood_resample!Function
likelihood_resample!(state, model::AbstractBinomialModel, obs)

Return the likelihood of an observation conditioned on the current state and model ensemble and at the same time resample the state ensemble (inner particles).

source
BinomialSynapses.indices!Function
indices!(v)

Return index table and total likelihoods from likelihood table v. This function modifies v; after execution, v will be the cumulative sum of the original v along the last dimension.

source
BinomialSynapses.resample!Function
resample!(state, idx)
resample!(model, idx)

Resample the outer particles of state or model ensembles based on index table idx.

source

OED

BinomialSynapses.OEDPolicyType
OEDPolicy <: Timestep

An abstract type for choosing time steps based on optimizing a given cost function. This is provided in order to do active inference.

source
BinomialSynapses.UniformType
Uniform(dts)

Randomly sample from a discrete set of time steps dts. This is equivalent to, but more convenient to use than RandomTimestep(dist) with dist a uniform distribution on dts.

source
BinomialSynapses.MyopicPolicyType
MyopicPolicy <: OEDPolicy

A myopic OEDPolicy, i.e. one in which only the effect of the next time step on the parameter estimation, e.g. the entropy of a parameter, is taken into account.

source
BinomialSynapses.MyopicType
Myopic(dts, target)

A parallel implementation of a myopic policy with candidate time steps dts and optimization target target, in which multiple copies of the particles are propagated in parallel. Implemented settings of target: choose time step such that it

  • _entropy: minimizes the joint entropy of the posterior distribution over parameters
  • _tauentropy: minimizes the marginal entropy of τ
source
BinomialSynapses.MyopicFastType
MyopicFast(dts, target)

MyopicFastis the same asMyopic, except that instead of expanding states and parameters along another dimension, and propagating each parameter with each dt,dtsare randomly assigned to members of the parameter ensemble. Implemented settings oftarget`: choose time step such that it

  • _entropy: minimizes the joint entropy of the posterior distribution over parameters
  • _tauentropy: minimizes the marginal entropy of τ
source

Simulation

BinomialSynapses.NestedFilterSimulationType
NestedFilterSimulation(hmodel, filter, hstate, fstate, tsteps, times, epsps)

This object stores static (hmodel, filter, tsteps) and dynamic (hstate, fstate, tsteps, times, epsps) information about the simulation.

source
BinomialSynapses.run!Function
run!(
    sim; 
    T, 
    plot_each_timestep = false, 
    recording = NoRecording
)

Run a simulation for T time steps. Set plot_each_timestep = true to get a live update of the simulation (this will reduce performance) and set recording to collect data while running the simulation (see Recording).

source
BinomialSynapses.RecordingType
Recording(f1, f2, data)

A recording, which is stored in data. The function f1 is something that is computed at each time step, whereas f2 is an operation that is applied after the simulation is finished.

source