Ratinabox

Latest version: v1.15.1

Safety actively analyzes 682416 Python packages for vulnerabilities to keep your Python projects secure.

Scan your dependencies

Page 4 of 6

1.10.2

We made a website for RatInABox which will eventually host all the documentation, demos etc. It's hosted on Github pages and can be found inside `docs`. [https://ratinabox-lab.github.io/RatInABox](https://ratinabox-lab.github.io/RatInABox)



Then I uploaded v1.10.1 but for some reason the source distribution files included all the demos etc and blew up in size to 90MB (I have no idea what changed?!). I fixed that by adding a MANIFEST.in but in the long run I'd like to fix the bug another way.

1.10

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)

1.9.3

Very minor change to resume compatibility with python >=3.7 (down from 3.10 in 1.9.2). See issue 79 and PR 81

1.9.2

Python requirement bumped from `>= 3.7` to `>= 3.10`. Comment on issue 79 if this causes problems to your workflow.

1.9.1

Minor big fix for `VectorCells`

1.9.0

Two main changes:

1. Refactoring of `VectorCells` (BVCs and OVCs) and `FieldOfViewNeurons` have been moved from contribs to main file `Neurons.py`. See 71
2. New `NeuralNetworkNeurons` class in contribs. These (exciting) new neurons map inputs through a user-provided PyTorch NN to the outputs. Can be used to make awesomely complex/trainable cell classes powered by RatInABox. It's mostly there but will stay as a contrib for now until its mature enough to go in main.

Page 4 of 6

© 2024 Safety CLI Cybersecurity Inc. All Rights Reserved.