2013-06-28から1日間の記事一覧

Earth Mover's distanceのR計算その2

library(emdist) my.emd <- function(A,B,r=100){ tandem.AB <- c(A,B) # そのtop 100をカットオフとする s.t.AB <- sort(tandem.AB,decreasing = TRUE) #cutoff <- s.t.AB[floor(length(tandem.AB)*r)] cutoff <- s.t.AB[r] # カットオフ以上の値の番地をと…