X-Git-Url: https://git.auder.net/?p=epclust.git;a=blobdiff_plain;f=epclust%2FR%2Fclustering.R;h=70d263e951f68b1cdc742caf15cf46f4aaf0fe83;hp=14915abf861bace1b6d4bd4f9f68283c004bfff9;hb=2b9f5356793c245a5e10229a74ac0dabd8f62508;hpb=eef6f6c97277ea3ce760981e5244cbde7fc904a0 diff --git a/epclust/R/clustering.R b/epclust/R/clustering.R index 14915ab..70d263e 100644 --- a/epclust/R/clustering.R +++ b/epclust/R/clustering.R @@ -11,8 +11,8 @@ #' and then WER distances computations, before applying the clustering algorithm. #' \code{computeClusters1()} and \code{computeClusters2()} correspond to the atomic #' clustering procedures respectively for stage 1 and 2. The former applies the -#' clustering algorithm (PAM) on a contributions matrix, while the latter clusters -#' a chunk of series inside one task (~max nb_series_per_chunk) +#' first clustering algorithm on a contributions matrix, while the latter clusters +#' a set of series inside one task (~nb_items_clust) #' #' @param indices Range of series indices to cluster in parallel (initial data) #' @param getContribs Function to retrieve contributions from initial series indices: @@ -31,11 +31,23 @@ NULL #' @rdname clustering #' @export clusteringTask1 = function( - indices, getContribs, K1, nb_items_per_chunk, ncores_clust=1, verbose=FALSE, parll=TRUE) + indices, getContribs, K1, nb_per_chunk, nb_items_clust, ncores_clust=1, + verbose=FALSE, parll=TRUE) { if (verbose) cat(paste("*** Clustering task 1 on ",length(indices)," lines\n", sep="")) + + + + + +##TODO: reviser le spreadIndices, tenant compte de nb_items_clust + + ##TODO: reviser / harmoniser avec getContribs qui en récupère pt'et + pt'et - !! + + + if (parll) { cl = parallel::makeCluster(ncores_clust)