A faire:
- finir les experiences (sur nb de classes, nb de curves / chunk, nb de procs)
et sur d'autres architectures
- ==> code OK, source("wrapper.R") puis
- serialize("build", "pathTo2010.csv","pathTo2010.bin")
+
+
+
+
+
+dans old_C_code/build :
+cmake ../stage1/src
+make
+
+dans data/, lancer R puis :
+source("../old_C_code/wrapper.R")
+serialize("../old_C_code/build", "2009.csv","2009.bin")
+
+
+
ppam_exe("build",np,"pathTo2010.bin","nbSeriesPerChunk nbClusters 1 2")
C = getMedoids("build", "ppamResult.xml", "ppamFinalSeries.bin")
quelques_series = deserialize("pathTo2010.bin", rangs...)
uint32_t nbSeries = work->nbSeries;
uint32_t tsLength = get_tsLength(work->inputFileName);
- uint32_t nbValues = (tsLength - 4) / 3;
+ uint32_t nbValues = (tsLength - 4) / 4;
// nbReducedCoordinates = smallest power of 2 which is above nbValues
uint32_t nbReducedCoordinates = (uint32_t)ceil(log2(nbValues));
ppam_exe = function(path=".", np=parallel::detectCores(), data=NULL,
- args="DontLetMeEmptyPlease!")
+ nbSeriesPerChunk, nbClusters, randomize=1, p_dissims=2)
{
+ args = paste(nbSeriesPerChunk," ",nbClusters," ",randomize," ",p_dissims,sep="")
+
command_line = paste("mpirun -np ",np," ",path,"/ppam.exe cluster",sep="")
#if data provided (as data.frame or matrix...): binarize it, and add it as first argument
sep=""))
}
-deserialize = function(path=".", binSeries, csvSeries, ranks="-1")
+deserialize = function(path=".", binSeries, csvSeries, ranks="-1", return=TRUE)
{
system(paste(path,"/ppam.exe deserialize ",binSeries," ",csvSeries," ",ranks,sep=""))
- return ( read.table(csvSeries, sep=",") )
+ if (return)
+ return ( read.table(csvSeries, sep=",") )
}