6 #' Must be called before getDetRandCurve()
8 #' @param N Number of curves
9 #' @param D Number of sample points
10 #' @param K Number of clusters
13 initClustersParams <- function(N, D, K)
15 # Generate K centroids
16 Ref_Centroids <<- sapply(1:K, function(k) cumsum(rnorm(D)))
22 #' TODO: improve this (using known clusters centers...)
24 #' @param i Some index
28 #' initCentroids(N=250000, D=15000, K=15)
29 #' res_ascii <- claws(getDetRandCurve, K1=50, K2=15, nb_series_per_chunk=500,
30 #' nb_items_clust=100, random=FALSE, verbose=TRUE, ncores_clust=3)
33 getDetRandCurve <- function(indices)
35 sapply(indices, function(i) {
36 if (i > Tot_Nb_Curves)
39 j <- sample(ncol(Ref_Centroids), 1)
40 Ref_Centroids[,j] + rnorm(nrow(Ref_Centroids))