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:
python
from ratinabox.Neurons import RandomSpatialNeurons
And use as follows:
python
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](https://github.com/TomGeorge1234/RatInABox/assets/41446693/9e4f4852-4894-4aa4-af42-b3ea906f4fda)
python
RSNs = RandomSpatialNeurons(Ag,
params = {'n':3,'lengthscale':0.2,},)
![ec435df1-ee45-4510-b2a5-1d19e82e45f6](https://github.com/TomGeorge1234/RatInABox/assets/41446693/d07624db-39c5-4fc6-a0de-cd19b1fca5e4)
python
Env = Environment(params={'dimensionality':'1D'})
Ag = Agent(Env)
RSNs = RandomSpatialNeurons(Ag,
params = {'n':10,'lengthscale':0.02,},)
![23436238-9a8d-43f4-8e55-8f0e6197b5d9](https://github.com/TomGeorge1234/RatInABox/assets/41446693/79486c29-25a6-442a-af24-55af59d8f4cd)