hausdorff_check | R Documentation |
The function includes two hausdorff distance. The first one is hausdorff_true_est (d(A_n, tilde{A}_n^f)): for each estimated change point, we find the closest true CP and compute the distance, then take the maximum of distances. The second one is hausdorff_est_true(d(tilde{A}_n^f, A_n)): for each true change point, find the closest estimated change point and compute the distance, then take the maximum of distances.
hausdorff_check(pts.final, brk)
pts.final |
a list of estimated change points |
brk |
the true change points |
hausdorff distance summary results, including mean, standard deviation and median.
## an example of 10 replicates result set.seed(1) nob <- 1000 brk <- c(333, 666, nob+1) cp.list <- vector('list', 10) for(i in 1:10){ cp.list[[i]] <- brk[1:2] + sample(c(-50:50),1) } # some replicate fails to detect all the change point cp.list[[2]] <- cp.list[[2]][1] cp.list[4] <- list(NULL) # setting 4'th element to NULL. # some replicate overestimate the number of change point cp.list[[3]] <- c(cp.list[[3]], 800) cp.list res <- hausdorff_check(cp.list, brk) res
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.