Skip to content

v1.10.0

Compare
Choose a tag to compare
@TomGeorge1234 TomGeorge1234 released this 12 Oct 00:15
· 57 commits to dev since this release

Random spatially tuned Neurons

In this version, besides minor bug fixes, we are releasing a new Neurons subclass called RandomSpatialNeurons for when you require spatially tuned neurons but which aren't necesarily place cells or grid cells etc.

Users specify a lengthscale and these neurons sample a smooth random function from a Gaussian process with a squared exponential covariance function (roughly analogous to weighted sum of Gaussians). This is a much more "assumption free" way to model spatially tuned inputs and should be useful to a lot of users.

Note walls still act correctly (covariance between points opposite side of a wall is high) and this works in 1D too.

Import like any neuron:

from ratinabox.Neurons import RandomSpatialNeurons

And use as follows:

Env = Environment()
Env.add_wall([[0.3,0.35],[0.3,0.85]])
Ag = Agent(Env)
RSNs = RandomSpatialNeurons(Ag,
                            params = {'n':3,'lengthscale':0.1,},)

RSNs.plot_rate_map()

a0054d84-2d56-4f5e-83a4-11e738688eb5

RSNs = RandomSpatialNeurons(Ag,
                            params = {'n':3,'lengthscale':0.2,},)

ec435df1-ee45-4510-b2a5-1d19e82e45f6

Env = Environment(params={'dimensionality':'1D'})
Ag = Agent(Env)
RSNs = RandomSpatialNeurons(Ag,
                            params = {'n':10,'lengthscale':0.02,},)

23436238-9a8d-43f4-8e55-8f0e6197b5d9