Skip to content

Commit

Permalink
Comparison board (#69)
Browse files Browse the repository at this point in the history
* config classes done

* gridscore metric

* add metric

* modified agent and exp for the metric

* updated metric- allows for 2 D

* Creado mediante Colaboratory

* Creado mediante Colaboratory

* colab example

* fixing colab

* Creado mediante Colaboratory

* colab on readme

* open in colab

* fixing path to colab

* setting colab env

* colab

* updating colab installation

* colab example skeleton done, need markdowns and explanation

* colab example from main

* config file running properly

* commenting config module, need to config other modules

* config file comment

* backend for automatic simulation

* single sim manager running properly

* generating dir when runing sim

* generalised plotting function

* wernle_2018

* forgot the pre-commit

* generalised rate map for experiments

* generalised rate plotting

* make plotting a module

* update metric

* testing sim manager

* metric that works + get rid of developement plot+ same fontsize

* pre commit

* saving entire object with pickle

* config input

* dict to json

* saving params as dict

* comparison from the run manadger

* status checker and load simulation

* status checker and load simulation

* fix hafting

* get ratemap matrix done for all agents, documentation of simulation manager done

* merging room

* weber plot_rates.py function

* plot rates

* nice plotting

* update rates function + test comparison figure on other agents

* comparison sargo

* update

* wenrnel tetrode, get_grid score, title figure , table figure and config update

* update the jupyter notebooks

* grid scorere

* New plotting Functions

* Really cool jupyter

* update

* width

* score

* the score

* juypter

* jupyter

* simulation manager notebook

* simulation manager notebook

* back to the previous setting

* Update metrics.py

Changed gridscore calc from using np.min and np.max to np.nanmin and np.nanmax

* passing test

* backend run example

* simulation manager example almost done

* changes

* simulation manager example done

* plot_utils

* remove debugging

* autoupdated pre-commit hooks

* smile emoji in readme

* try excluding README from trim-trailing-whitespace hook

* remove config_params.yaml

---------

Co-authored-by: rodrigcd <[email protected]>
Co-authored-by: rodrigcd <[email protected]>
Co-authored-by: rhayman <[email protected]>
Co-authored-by: niksirbi <[email protected]>
Co-authored-by: Adam Tyson <[email protected]>
  • Loading branch information
6 people authored Jul 28, 2023
1 parent b148ff1 commit 2234c7d
Show file tree
Hide file tree
Showing 37 changed files with 11,083 additions and 2,913 deletions.
4 changes: 2 additions & 2 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,10 @@ repos:
- id: trailing-whitespace
exclude: 'README.md'
- repo: https://github.com/charliermarsh/ruff-pre-commit
rev: v0.0.265
rev: v0.0.280
hooks:
- id: ruff
- repo: https://github.com/psf/black
rev: 23.3.0
rev: 23.7.0
hooks:
- id: black
5 changes: 2 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,6 @@
[![All Contributors](https://img.shields.io/badge/all_contributors-9-orange.svg?style=flat-square)](#contributors-)
<!-- ALL-CONTRIBUTORS-BADGE:END -->



* [1 Introduction](#1-Introduction)
* [2 Installation ](#2-Installation)
* [3 The Project](#3-Project)
Expand Down Expand Up @@ -74,7 +72,8 @@ pip install -e '.[dev]'

## 3. Project

Try our package! We are gathering opinions to focus our efforts on improving aspects of the code or adding new features, so if you tell us what you would like to have, we might just implement it ;) Please refer to the [Roadmap](https://github.com/ClementineDomine/NeuralPlayground/blob/main/documents/road_map.md) to understand the state of the project and get an idea of the direction it is going in. This open-source software was built to be collaborative and lasting. We hope that the framework will be simple enough to be adopted by a great number of neuroscientists, eventually guiding the path to the computational understanding of the HEC mechanisms. We follow reproducible, inclusive, and collaborative project design guidelines. All relevant documents can be found in [Documents](https://github.com/ClementineDomine/NeuralPlayground/blob/main/documents/).
Try our package! We are gathering opinions to focus our efforts on improving aspects of the code or adding new features, so if you tell us what you would like to have, we might just implement it 😊.
Please refer to the [Roadmap](https://github.com/ClementineDomine/NeuralPlayground/blob/main/documents/road_map.md) to understand the state of the project and get an idea of the direction it is going in. This open-source software was built to be collaborative and lasting. We hope that the framework will be simple enough to be adopted by a great number of neuroscientists, eventually guiding the path to the computational understanding of the HEC mechanisms. We follow reproducible, inclusive, and collaborative project design guidelines. All relevant documents can be found in [Documents](https://github.com/ClementineDomine/NeuralPlayground/blob/main/documents/).

#### How to run a single module

Expand Down
5,863 changes: 5,534 additions & 329 deletions examples/agent_examples/stachenfeld_2018_examples.ipynb

Large diffs are not rendered by default.

212 changes: 124 additions & 88 deletions examples/agent_examples/weber_2018_example.ipynb

Large diffs are not rendered by default.

394 changes: 294 additions & 100 deletions examples/arena_examples/arena_examples.ipynb

Large diffs are not rendered by default.

684 changes: 684 additions & 0 deletions examples/comparisons_examples/Comparision_from_manadger.ipynb

Large diffs are not rendered by default.

12 changes: 7 additions & 5 deletions examples/comparisons_examples/comparison_examples.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -139,13 +139,13 @@
"source": [
"sr = agent.update_successor_rep() # One can compute the successor representation using successive additive update\n",
"\n",
"agent.plot_eigen(sr,eigen=[1,10,15,20], save_path=None)\n",
"agent.plot_eigen(sr,eigen_vectors=[1,10,15,20], save_path=None)\n",
"\n",
"sr_td = agent.update_successor_rep_td_full() # Compute the successor representation matrix using TD learning\n",
"agent.plot_eigen(sr_td, eigen=[1,10,15,20],save_path=None)\n",
"agent.plot_eigen(sr_td, eigen_vectors=[1,10,15,20],save_path=None)\n",
"\n",
"sr_sum = agent.successor_rep_sum() # One can compute the successor representation matrix using geometric sums for $\\gamma<1$\n",
"agent.plot_eigen(sr_sum, eigen=[1,10,15,20],save_path=None)\n"
"agent.plot_eigen(sr_sum, eigen_vectors=[1,10,15,20],save_path=None)\n"
]
},
{
Expand Down Expand Up @@ -892,7 +892,9 @@
"execution_count": null,
"metadata": {},
"outputs": [],
"source": []
"source": [
"We add a Compai"
]
}
],
"metadata": {
Expand All @@ -911,7 +913,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.10.9"
"version": "3.11.3"
}
},
"nbformat": 4,
Expand Down
1,155 changes: 1,155 additions & 0 deletions examples/comparisons_examples/comparison_examples_score.ipynb

Large diffs are not rendered by default.

898 changes: 898 additions & 0 deletions examples/comparisons_examples/simulation_manager.ipynb

Large diffs are not rendered by default.

Loading

0 comments on commit 2234c7d

Please sign in to comment.