From: Benjamin Auder Date: Wed, 8 Feb 2017 12:08:07 +0000 (+0100) Subject: fix stage2.R X-Git-Url: https://git.auder.net/doc/html/css/current/index.css?a=commitdiff_plain;h=3ccd1e391850c1f055267b05bf89589113884344;p=epclust.git fix stage2.R --- diff --git a/epclust/R/stage2.R b/epclust/R/stage2.R index 254092c..9c15a74 100644 --- a/epclust/R/stage2.R +++ b/epclust/R/stage2.R @@ -85,13 +85,6 @@ cwt.ts <- function(ts,s0,noctave=5,nvoice=10,w0=2*pi) vect2mat <- function(vect, delta, lscvect) { vect <- as.vector(vect) - -print(delta) -print(lscvect) -print(delta * lscvect) -browser() - - matrix(vect[-(1:2)], delta, lscvect) } @@ -156,7 +149,7 @@ step2 = function(conso) # observations node with CWT Xcwt4 <- toCWT(conso, noctave = noctave4, dt = 1, scalevector = scalevector4, lt = delta, smooth = FALSE, nvoice = nvoice) -browser() + #matrix: ############Xcwt2 <- matrix(0.0, nrow= n, ncol= 2 + delta * lscvect) Xcwt2 <- matrix(NA_complex_, nrow= n, ncol= 2 + length((c(Xcwt4[,,1])))) @@ -166,17 +159,15 @@ browser() Xcwt2[i,] <- c(delta, lscvect, Xcwt4[,,i] / max(Mod(Xcwt4[,,i])) ) #rm(conso, Xcwt4); gc() + #Benjamin: FIX is this OK ? + lscvect = dim(Xcwt4)[2] + ## _.b WER^2 distances ######## Xwer_dist <- matrix(0.0, n, n) for(i in 1:(n - 1)) { - - - - - - -##ERROR là :: delta lscvect --> taille ??! +#browser() +##ERROR là sans FIX lscvect :: delta lscvect --> taille ??! mat1 <- vect2mat(Xcwt2[i,], delta, lscvect) for(j in (i + 1):n)