indices_workers[[i]] = indices_clust[(nb_series_per_chunk*(i-1)+1):upper_bound]
}
indices_clust = parallel::parLapply(cl, indices_workers, clusterChunk, K1, K2*(WER=="mix"))
+ # TODO: soft condition between K2 and K1, before applying final WER step
if ((WER=="end" && length(indices_clust)==K1) || (WER=="mix" && length(indices_clust)==K2))
break
}
coeffs_chunk
}
-#NOTE: always keep ID in first column
+#NOTE: always keep ID in first column (...? is it good ?!)
curvesToCoeffs = function(series, wf)
{
if (!require(wavelets, quietly=TRUE))