-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathnotes
More file actions
40 lines (28 loc) · 1.83 KB
/
notes
File metadata and controls
40 lines (28 loc) · 1.83 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
k-nearest neighbor graphs: Here the goal is to connect vertex vi with vertex vj if vj is among
the k-nearest neighbors of vi. However, this definition leads to a directed graph, as the neighborhood
relationship is not symmetric. There are two ways of making this graph undirected. The first way is
to simply ignore the directions of the edges, that is we connect vi and vj with an undirected edge if vi
is among the k-nearest neighbors of vj or if vj is among the k-nearest neighbors of vi. The resulting
graph is what is usually called the k-nearest neighbor graph. The second choice is to connect vertices
vi and vj if both vi is among the k-nearest neighbors of vj and vj is among the k-nearest neighbors of
vi. The resulting graph is called the mutual k-nearest neighbor graph. In both cases, after connecting
the appropriate vertices we weight the edges by the similarity of their endpoints.
# alldepths::Vector{Float64} = parse.(Float64, info.(clustervector(exp), "depth"))
# maxdepth::Float64 = maximum(alldepths)
# depthinterval = maxdepth / depths
# actualdepths::Vector{Int64} = Int64[]
# Determine what depths to include
# for d in depths:-1:1
# if length(alldepths[(d-1)*depthinterval.<=alldepths.<d*depthinterval]) != 0
# push!(actualdepths, d)
# end
# end
# FIX: Make this not return normalized values.
# nbacktime = mstosamplerate(exp, relativespecs(exp, "back")) / period
# backbins::Int64 = floor(nbacktime)
# lins = Vector{Vector{Float64}}(undef, 0)
# for i in actualdepths
# times::Vector{Float64} = frequency(unpackvector(spikesatdepth(exp, ((i - 1) * depthinterval, i * depthinterval))), period)
# normalize!(times, (0.0, mean(times[1:backbins])))
# push!(lins, times[2:end])
# end