|
14 | 14 | # name: julia-preloaded-1.7
|
15 | 15 | # ---
|
16 | 16 |
|
17 |
| -# # 2022-09-15 • Two-pass connection test: peak-to-peak, then correlation with found average |
| 17 | +# # 2022-09-15 • Two-pass connection test: ptp, then corr with found avg |
| 18 | + |
| 19 | +# Two-pass connection test: peak-to-peak, then correlation with found average |
18 | 20 |
|
19 | 21 | # ## Imports
|
20 | 22 |
|
@@ -44,15 +46,47 @@ p = get_params(
|
44 | 46 |
|
45 | 47 | @time s = cached(sim, [p.sim]);
|
46 | 48 |
|
47 |
| -# (To speed this up: SnoopCompile. Not now). |
| 49 | +# (To speed this up (precompile this further): investigate with SnoopCompile or JET. Not now). |
48 | 50 |
|
49 | 51 | s = augment(s, p);
|
50 | 52 |
|
51 |
| -using VoltoMapSim.Plot |
| 53 | +# ## First pass: peak-to-peak |
| 54 | + |
| 55 | +# Let's start with just neuron 1 as postsyn. |
| 56 | + |
| 57 | +m = 1; |
| 58 | + |
| 59 | +perf = cached_conntest_eval(s,m,p); |
| 60 | + |
| 61 | +p.conntest.STA_test_statistic |
| 62 | + |
| 63 | +ENV["LINES"] = 4 |
| 64 | +perf.tested_neurons |
| 65 | + |
| 66 | +# We take all inputs with `predicted_type` :exc. |
| 67 | +# |
| 68 | +# Current pval threshold is 0.05. |
| 69 | +# We could be stricter. |
| 70 | +# |
| 71 | +# It'll be tradeoff: stricter threshold gives less STAs to average to build our template; |
| 72 | +# but there will be less noisy STAs mixed in (or even wrong STAs, i.e. of non-inputs). |
| 73 | + |
| 74 | +# + |
| 75 | +#= implementation note: |
| 76 | +it's a two stage process, so maybe split dataframe. |
| 77 | +namely: |
| 78 | +
|
| 79 | +(inputID, postsynID) -> (pval, area_over_start) -> predicted_type |
| 80 | +
|
| 81 | +first step depends on 'test statistics' used (ptp, corr-with-some-template). |
| 82 | +second step depends on α. |
| 83 | +
|
| 84 | +(between first and second data, there's a "-> STA ->" step. |
| 85 | +But we don't save that STA in dataframe, too large. it's implicit). |
| 86 | +
|
| 87 | +The large work btw is the first step: the shuffles, and for each calculating STA. |
| 88 | +So.. we could indeed store these shuffled STAs.. it's just 1000 samples per. |
| 89 | +=# |
| 90 | +# - |
52 | 91 |
|
53 |
| -using Pkg |
54 | 92 |
|
55 |
| -@time plotSTA(1=>1,s,p); |
56 |
| -# plotSTA(2=>2,s,p); |
57 |
| -# plotSTA(801=>801,s,p); |
58 |
| -# plotSTA(802=>802,s,p); |
|
0 commit comments