projects
/
epclust.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Add comments to easily read code
[epclust.git]
/
epclust
/
R
/
clustering.R
diff --git
a/epclust/R/clustering.R
b/epclust/R/clustering.R
index
14915ab
..
70d263e
100644
(file)
--- 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
#' 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:
#'
#' @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(
#' @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=""))
{
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)
if (parll)
{
cl = parallel::makeCluster(ncores_clust)