From 65bd7506a22f58e425d5de32cd58b70efad2b2ab Mon Sep 17 00:00:00 2001 From: Benjamin Auder <benjamin.auder@somewhere> Date: Thu, 19 Jan 2017 02:08:10 +0100 Subject: [PATCH] separate TODO and wrapper example --- "\033\033\033:q" | 65 ++++++++++++++++++++++++++++++++++++++++++++ TODO | 22 ++++++--------- old_C_code/wrapper.R | 18 ++++++++++++ 3 files changed, 92 insertions(+), 13 deletions(-) create mode 100644 "\033\033\033:q" diff --git "a/\033\033\033:q" "b/\033\033\033:q" new file mode 100644 index 0000000..269f22e --- /dev/null +++ "b/\033\033\033:q" @@ -0,0 +1,65 @@ +[1mdiff --git a/TODO b/TODO[m +[1mindex 9fd325a..cd454f2 100644[m +[1m--- a/TODO[m +[1m+++ b/TODO[m +[36m@@ -18,25 +18,21 @@[m [mA faire:[m + - finir les experiences (sur nb de classes, nb de curves / chunk, nb de procs)[m + et sur d'autres architectures[m + [m +[31m-[m +[31m-[m +[31m-[m +[31m-[m + dans old_C_code/build :[m + cmake ../stage1/src[m + make[m + [m + dans data/, lancer R puis :[m + source("../old_C_code/wrapper.R")[m +[31m-serialize("../old_C_code/build", "2009.csv","2009.bin")[m +[31m-[m +[31m-[m +[31m-[m +[31m- ppam_exe("build",np,"pathTo2010.bin","nbSeriesPerChunk nbClusters 1 2")[m +[31m- C = getMedoids("build", "ppamResult.xml", "ppamFinalSeries.bin")[m +[31m- quelques_series = deserialize("pathTo2010.bin", rangs...)[m +[31m- #plot C ... et quelques_series ...[m +[31m- getDistor("buid", "ppamResult.xml", "pathTo2010.bin")[m +[32m+[m[32mserialize("../old_C_code/build", "2009.csv","2009.bin",1)[m +[32m+[m[32mlibrary(parallel)[m +[32m+[m[32mnp = detectCores()[m +[32m+[m[32mnbSeriesPerChunk = 3000[m +[32m+[m[32mnbClusters = 20[m +[32m+[m[32mppam_exe("../old_C_code/build",np,"2009.bin",nbSeriesPerChunk,nbClusters)[m +[32m+[m[32mC = getMedoids("../old_C_code/build", "ppamResult.xml", "ppamFinalSeries.bin")[m +[32m+[m[32mfirst100series = deserialize("../old_C_code/build", "2009.bin", "2009.csv.part", "1-100")[m +[32m+[m[32mdistor = getDistor("../old_C_code/build", "ppamResult.xml", "2009.bin")[m + [m + - interface matrice -> binaire[m + OK[m +[1mdiff --git a/old_C_code/wrapper.R b/old_C_code/wrapper.R[m +[1mindex ee15a79..d6d05e1 100644[m +[1m--- a/old_C_code/wrapper.R[m +[1m+++ b/old_C_code/wrapper.R[m +[36m@@ -1,3 +1,21 @@[m +[32m+[m[32m#Exemple :[m +[32m+[m[32m#[m +[32m+[m[32m#dans old_C_code/build :[m +[32m+[m[32m#cmake ../stage1/src[m +[32m+[m[32m#make[m +[32m+[m[32m#[m +[32m+[m[32m#dans data/, lancer R puis :[m +[32m+[m[32m#source("../old_C_code/wrapper.R")[m +[32m+[m[32m#serialize("../old_C_code/build", "2009.csv","2009.bin",1)[m +[32m+[m[32m#library(parallel)[m +[32m+[m[32m#np = detectCores()[m +[32m+[m[32m#nbSeriesPerChunk = 3000[m +[32m+[m[32m#nbClusters = 20[m +[32m+[m[32m#ppam_exe("../old_C_code/build",np,"2009.bin",nbSeriesPerChunk,nbClusters)[m +[32m+[m[32m#C = getMedoids("../old_C_code/build", "ppamResult.xml", "ppamFinalSeries.bin")[m +[32m+[m[32m#first100series = deserialize("../old_C_code/build", "2009.bin", "2009.csv.part", "1-100")[m +[32m+[m[32m#distor = getDistor("../old_C_code/build", "ppamResult.xml", "2009.bin")[m +[32m+[m + ppam_exe = function(path=".", np=parallel::detectCores(), data=NULL,[m + nbSeriesPerChunk, nbClusters, randomize=1, p_dissims=2)[m + {[m diff --git a/TODO b/TODO index 9fd325a..cd454f2 100644 --- a/TODO +++ b/TODO @@ -18,25 +18,21 @@ A faire: - finir les experiences (sur nb de classes, nb de curves / chunk, nb de procs) et sur d'autres architectures - - - - 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...) - #plot C ... et quelques_series ... - getDistor("buid", "ppamResult.xml", "pathTo2010.bin") +serialize("../old_C_code/build", "2009.csv","2009.bin",1) +library(parallel) +np = detectCores() +nbSeriesPerChunk = 3000 +nbClusters = 20 +ppam_exe("../old_C_code/build",np,"2009.bin",nbSeriesPerChunk,nbClusters) +C = getMedoids("../old_C_code/build", "ppamResult.xml", "ppamFinalSeries.bin") +first100series = deserialize("../old_C_code/build", "2009.bin", "2009.csv.part", "1-100") +distor = getDistor("../old_C_code/build", "ppamResult.xml", "2009.bin") - interface matrice -> binaire OK diff --git a/old_C_code/wrapper.R b/old_C_code/wrapper.R index ee15a79..d6d05e1 100644 --- a/old_C_code/wrapper.R +++ b/old_C_code/wrapper.R @@ -1,3 +1,21 @@ +#Exemple : +# +#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",1) +#library(parallel) +#np = detectCores() +#nbSeriesPerChunk = 3000 +#nbClusters = 20 +#ppam_exe("../old_C_code/build",np,"2009.bin",nbSeriesPerChunk,nbClusters) +#C = getMedoids("../old_C_code/build", "ppamResult.xml", "ppamFinalSeries.bin") +#first100series = deserialize("../old_C_code/build", "2009.bin", "2009.csv.part", "1-100") +#distor = getDistor("../old_C_code/build", "ppamResult.xml", "2009.bin") + ppam_exe = function(path=".", np=parallel::detectCores(), data=NULL, nbSeriesPerChunk, nbClusters, randomize=1, p_dissims=2) { -- 2.44.0