WAT-ai / BCI-Signal-Decoding

General Repository for all BCI Signal Decoding Material
MIT License
1 stars 0 forks source link

MEM #2: Implement Decoding in Nengo Model #5

Open jkbchouinard opened 2 weeks ago

jkbchouinard commented 2 weeks ago

Taking the calculated decoders, implement them in Nengo as transformations between the spike data and the output -- simulate this model on a small subset of the data. This implementation should allow us to see how the linear transformations handle a basic spike-to-kinematic prediction. Considering a minimum of a two-dimensional output, ensure your neuron population has at least 100 neurons.

Ex.:

model = nengo.Network()
with model:
    pre = nengo.Node(*something*)
    post = nengo.Ensemble(*something*)
    con = nengo.Connection(pre, post, transform=D_reg)
    p_post = nengo.Probe(post) # A probe enables us to assess the simulation data for a specific model component
with nengo.Simulator(model) as sim:
    sim.run(10) # This is an arbitrary amount of time just for the example
plt.plot(sim.data[p_post]) # This will plot the output values of the post ensemble as recorded by the probe
aaronjuma commented 2 days ago

Nengo model is implemented. It can be found here: https://github.com/WAT-ai/BCI-Signal-Decoding/blob/mem1-thomas/src/NengoDecodingModel/main.ipynb

jkbchouinard commented 1 day ago