X-Git-Url: https://git.auder.net/images/pieces/Cwda/bg.svg?a=blobdiff_plain;f=code%2Fstage2%2Fsrc%2F02_cluster_2009.r;h=3514ce769480da5eccc1ab615cd6ad37de12a0e9;hb=572d139adaf3ca05e1c25ad29a71d3b38f0bcef8;hp=f08d82ba358d583aa443a9e9a650e7fbc4bf514a;hpb=0c393effd785e90f9414f2132f6732cabef7c176;p=epclust.git diff --git a/code/stage2/src/02_cluster_2009.r b/code/stage2/src/02_cluster_2009.r index f08d82b..3514ce7 100644 --- a/code/stage2/src/02_cluster_2009.r +++ b/code/stage2/src/02_cluster_2009.r @@ -24,7 +24,7 @@ sdcontrib <- apply(matcontrib0, 1, sd) lims <- quantile(sdcontrib, probs = c(.005, .995)) # obtain 1%-extreme data is_normal <- which((sdcontrib > lims[1]) & (sdcontrib < lims[2])) -matcontri_ext <- matcontrib0[-is_normal, ]"" +matcontri_ext <- matcontrib0[-is_normal, ]#"" matcontrib <- matcontrib0[is_normal, ] # wipe out aberrant data matcontrib <- t(apply(matcontrib, 1, function(x) x / sum(x))) @@ -39,6 +39,9 @@ selvar <- ci$selectv ## c. Clustering ########## K <- 200 system.time( + +#TODO: cette partie en C + clfit <- clara(x = tdata[, selvar], k = K, sampsize = 4000,