clusteringTask1 <- function(indices, getContribs, K1, algoClust1, nb_items_clust,
ncores_clust=3, verbose=FALSE, parll=TRUE)
{
+ if (verbose)
+ cat(paste("*** Clustering task 1 on ",length(indices)," series [start]\n", sep=""))
+
+ if (length(indices) <= K1)
+ return (indices)
+
if (parll)
{
# outfile=="" to see stderr/stdout on terminal
{
# Balance tasks by splitting the indices set - as evenly as possible
indices_workers <- .splitIndices(indices, nb_items_clust, min_size=K1+1)
- if (verbose)
- cat(paste("*** [iterated] Clustering task 1 on ",length(indices)," series\n", sep=""))
indices <-
if (parll)
{
inds[ algoClust1(getContribs(inds), K1) ]
) )
}
+ if (verbose)
+ {
+ cat(paste("*** Clustering task 1 on ",length(indices)," medoids [iter]\n", sep=""))
+ }
}
if (parll)
parallel::stopCluster(cl)