v1.10.0
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()
RSNs = RandomSpatialNeurons(Ag,
params = {'n':3,'lengthscale':0.2,},)
Env = Environment(params={'dimensionality':'1D'})
Ag = Agent(Env)
RSNs = RandomSpatialNeurons(Ag,
params = {'n':10,'lengthscale':0.02,},)