Learn R Programming

mmpp (version 0.1)

coocmetric: Metrics for Point Process Instances Based on Co-occurrence

Description

For comparing two SPP instances, it is natural to count the number of events which can be considered to be co-occurring. There are two metrics for SPP instances based on the notion of co-occurrence. The first one proposed by Quian Quiroga et al. (2002) directly counts near-by events. The second counting metric co-occurrence is proposed by Hunter and Milton (2003), which is based on a smoothing function.

Usage

coocmetric(S1, S2, measure = "sim", type = "count", tau = 1, M = NULL)

Arguments

S1
MPP instance
S2
MPP instance
measure
"sim" for similarity and "dist" for distance. Default "sim".
type
if "count", counting near-by event measure by Quian is computed. if "smooth", smoothed counting co-occurrence measure by Hunter and Milton is computed. Default "count".
tau
parameter for filtering function.
M
a precision matrix for filter of marks, i.e., exp( - r' M r) is used for filtering marks. It should be symmetric and positive semi-definite.

Value

  • similarity or distance between two inputs (marked) point process S1 and S2.

Details

coocmetric computes co-occurrence base metrics for two point process instances. This function counts the number of events in S1 which is coincided with those in S2, and vise versa.

References

R.Quian Quiroga, T. Kreuz, P.Grassberger. 2008. Event synchronization: a simple and fast method to measure synchronicity and time delay patterns. Physical Review E 66 (4), 041904, 2002.

J.D. Hunter and G. Milton, 2003. Amplitude and frequency dependence of spike timing: implications for dynamic regulation. J. Neurophysiology 90, 387--94.

Examples

Run this code
## The aftershock data of 26th July 2003 earthquake of M6.2 at the northern Miyagi-Ken Japan.
data(Miyagi20030626)
##  no. longitude latitude magnitude     time  depth year month day
## split events by 7-day
sMiyagi <- splitMPP(Miyagi20030626,h=60*60*7,scaleMarks=TRUE)$S
N <- 10
sMat <- matrix(0,N,N)
tau<-0.2
  cat("calculating coocmetric(smooth)...")
 for(i in 1:(N)){
   cat(i,"")
   for(j in i:N){
     S1 <- sMiyagi[[i]]$time;S2 <- sMiyagi[[j]]$time
    sMat[i,j] <- coocmetric(S1,S2,type="smooth",tau=tau,M=diag(1,4))
   }
 }
 sMat <- sMat+t(sMat)
 tmpd <- diag(sMat) <- diag(sMat)/2
 sMat <- sMat/sqrt(outer(tmpd,tmpd))
image(sMat)

Run the code above in your browser using DataLab