Last active
August 15, 2023 03:58
-
-
Save russelljjarvis/c5581ab4ae0e532877e8eb87c99c2340 to your computer and use it in GitHub Desktop.
spike2VecSTDP.jl
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using CSV | |
using DataFrames | |
using Plots | |
using OnlineStats | |
df2= CSV.read("output_spikes.csv",DataFrame) | |
# make nodes of type float. | |
nodes = df2.id | |
times = df2.time_ms | |
nodes = Vector{Float32}(nodes) | |
# deal with Julia being not base 0, like Python. | |
nodes = [n+1 for n in nodes ] | |
xy = zip(nodes,times) | |
# set node and time dimensions: | |
xargs = minimum(nodes):1:maximum(nodes); | |
yargs = minimum(times):maximum(times)/500:maximum(times) | |
o = fit!(HeatMap(yargs,xargs),xy) | |
display(plot(o,marginals=false)) | |
savefig("stdp_exp.png") |
Author
russelljjarvis
commented
Aug 15, 2023
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment