Skip to content

cluster_spacetime_()

jamesjun edited this page Dec 13, 2017 · 11 revisions

Run spatiotemporal DPCLUS clustering and determine the density (rho) and nearest distance (delta) for each spiking event. For a given site K, the algorithm computes the distances between events that occurs nearby in time and space using a following criteria: for a spiking event having a peak site at K, it computes distances to other events whose peak occurs at K or whose second peak occurs at K. The distance is only computed for temporal neighbors to deal with probe drift. If nTime_clu==1, all neighbors are used, and if nTime_clu==2, half of the neighbors are used based on the temporal proximity.

Once the distance is computed, the density (rho) is computed for each event by counting the number of neighbors having distance less than dc (cut-off distance). The nearest distance (delta) is computed for each event by finding a nearest neighbor having a greater density value. The density value (rho) is normalized by dividing by the number of spatiotemporal neighbors being compared, and the nearest distance (delta) is normalized by dc.

Syntax

  • S_clu = cluster_spacetime_(S0, P)
  • S_clu = cluster_spacetime_(S0, P, vlRedo_spk)

Input

Output

Operations

  • For each site k
    • fet12_site_(): Collect features of the spikes whose peak (S0.viSite_spk) is at site k (n1 number of spikes), or whose second peak (S0.viSite2_spk) is at site k (n2 number of spikes).
    • Calculate the distance cutoff (dc), which is set at the Euclidean distance percentile (P.dc_percent)
    • cuda_rho_(): Calculate Rho (density) for n1 spikes
  • For each site k
    • cuda_delta_(): Calculate delta (distance separation) for n1 spikes
Clone this wiki locally