separate TODO and wrapper example
authorBenjamin Auder <benjamin.auder@somewhere>
Thu, 19 Jan 2017 01:08:10 +0000 (02:08 +0100)
committerBenjamin Auder <benjamin.auder@somewhere>
Thu, 19 Jan 2017 01:08:10 +0000 (02:08 +0100)
\e\e\e:q [new file with mode: 0644]
TODO
old_C_code/wrapper.R

diff --git a/\e\e\e:q b/\e\e\e:q
new file mode 100644 (file)
index 0000000..269f22e
--- /dev/null
+++ b/\e\e\e:q
@@ -0,0 +1,65 @@
+\e[1mdiff --git a/TODO b/TODO\e[m
+\e[1mindex 9fd325a..cd454f2 100644\e[m
+\e[1m--- a/TODO\e[m
+\e[1m+++ b/TODO\e[m
+\e[36m@@ -18,25 +18,21 @@\e[m \e[mA faire:\e[m
+  - finir les experiences (sur nb de classes, nb de curves / chunk, nb de procs)\e[m
+    et sur d'autres architectures\e[m
\e[m
+\e[31m-\e[m
+\e[31m-\e[m
+\e[31m-\e[m
+\e[31m-\e[m
+ dans old_C_code/build :\e[m
+ cmake ../stage1/src\e[m
+ make\e[m
\e[m
+ dans data/, lancer R puis :\e[m
+ source("../old_C_code/wrapper.R")\e[m
+\e[31m-serialize("../old_C_code/build", "2009.csv","2009.bin")\e[m
+\e[31m-\e[m
+\e[31m-\e[m
+\e[31m-\e[m
+\e[31m-  ppam_exe("build",np,"pathTo2010.bin","nbSeriesPerChunk nbClusters 1 2")\e[m
+\e[31m-  C = getMedoids("build", "ppamResult.xml", "ppamFinalSeries.bin")\e[m
+\e[31m-  quelques_series = deserialize("pathTo2010.bin", rangs...)\e[m
+\e[31m-  #plot C ... et quelques_series ...\e[m
+\e[31m-  getDistor("buid", "ppamResult.xml", "pathTo2010.bin")\e[m
+\e[32m+\e[m\e[32mserialize("../old_C_code/build", "2009.csv","2009.bin",1)\e[m
+\e[32m+\e[m\e[32mlibrary(parallel)\e[m
+\e[32m+\e[m\e[32mnp = detectCores()\e[m
+\e[32m+\e[m\e[32mnbSeriesPerChunk = 3000\e[m
+\e[32m+\e[m\e[32mnbClusters = 20\e[m
+\e[32m+\e[m\e[32mppam_exe("../old_C_code/build",np,"2009.bin",nbSeriesPerChunk,nbClusters)\e[m
+\e[32m+\e[m\e[32mC = getMedoids("../old_C_code/build", "ppamResult.xml", "ppamFinalSeries.bin")\e[m
+\e[32m+\e[m\e[32mfirst100series = deserialize("../old_C_code/build", "2009.bin", "2009.csv.part", "1-100")\e[m
+\e[32m+\e[m\e[32mdistor = getDistor("../old_C_code/build", "ppamResult.xml", "2009.bin")\e[m
\e[m
+ - interface matrice -> binaire\e[m
+        OK\e[m
+\e[1mdiff --git a/old_C_code/wrapper.R b/old_C_code/wrapper.R\e[m
+\e[1mindex ee15a79..d6d05e1 100644\e[m
+\e[1m--- a/old_C_code/wrapper.R\e[m
+\e[1m+++ b/old_C_code/wrapper.R\e[m
+\e[36m@@ -1,3 +1,21 @@\e[m
+\e[32m+\e[m\e[32m#Exemple :\e[m
+\e[32m+\e[m\e[32m#\e[m
+\e[32m+\e[m\e[32m#dans old_C_code/build :\e[m
+\e[32m+\e[m\e[32m#cmake ../stage1/src\e[m
+\e[32m+\e[m\e[32m#make\e[m
+\e[32m+\e[m\e[32m#\e[m
+\e[32m+\e[m\e[32m#dans data/, lancer R puis :\e[m
+\e[32m+\e[m\e[32m#source("../old_C_code/wrapper.R")\e[m
+\e[32m+\e[m\e[32m#serialize("../old_C_code/build", "2009.csv","2009.bin",1)\e[m
+\e[32m+\e[m\e[32m#library(parallel)\e[m
+\e[32m+\e[m\e[32m#np = detectCores()\e[m
+\e[32m+\e[m\e[32m#nbSeriesPerChunk = 3000\e[m
+\e[32m+\e[m\e[32m#nbClusters = 20\e[m
+\e[32m+\e[m\e[32m#ppam_exe("../old_C_code/build",np,"2009.bin",nbSeriesPerChunk,nbClusters)\e[m
+\e[32m+\e[m\e[32m#C = getMedoids("../old_C_code/build", "ppamResult.xml", "ppamFinalSeries.bin")\e[m
+\e[32m+\e[m\e[32m#first100series = deserialize("../old_C_code/build", "2009.bin", "2009.csv.part", "1-100")\e[m
+\e[32m+\e[m\e[32m#distor = getDistor("../old_C_code/build", "ppamResult.xml", "2009.bin")\e[m
+\e[32m+\e[m
+ ppam_exe = function(path=".", np=parallel::detectCores(), data=NULL,\e[m
+       nbSeriesPerChunk, nbClusters, randomize=1, p_dissims=2)\e[m
+ {\e[m
diff --git a/TODO b/TODO
index 9fd325a..cd454f2 100644 (file)
--- 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
index ee15a79..d6d05e1 100644 (file)
@@ -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)
 {