[mlpack-svn] r15666 - in mlpack/conf/jenkins-conf/benchmark: . methods/mlpy

fastlab-svn at coffeetalk-1.cc.gatech.edu fastlab-svn at coffeetalk-1.cc.gatech.edu
Mon Aug 26 08:08:17 EDT 2013


Author: marcus
Date: Mon Aug 26 08:08:16 2013
New Revision: 15666

Log:
Add makefile parameters for the memory script.

Modified:
   mlpack/conf/jenkins-conf/benchmark/Makefile
   mlpack/conf/jenkins-conf/benchmark/methods/mlpy/pca.py

Modified: mlpack/conf/jenkins-conf/benchmark/Makefile
==============================================================================
--- mlpack/conf/jenkins-conf/benchmark/Makefile	(original)
+++ mlpack/conf/jenkins-conf/benchmark/Makefile	Mon Aug 26 08:08:16 2013
@@ -52,7 +52,7 @@
 	$(PYTHON_BIN) $(BENCHMARKDDIR)/run_benchmark.py -c $(CONFIG) -b $(BLOCK) -l $(LOG)
 
 memory:
-	$(PYTHON_BIN) $(BENCHMARKDDIR)/memory_benchmark.py -c $(CONFIG)
+	$(PYTHON_BIN) $(BENCHMARKDDIR)/memory_benchmark.py -c $(CONFIG) -b $(BLOCK) -l $(LOG)
 
 reports:
 	$(PYTHON_BIN) $(BENCHMARKDDIR)/make_reports.py -c $(CONFIG)

Modified: mlpack/conf/jenkins-conf/benchmark/methods/mlpy/pca.py
==============================================================================
--- mlpack/conf/jenkins-conf/benchmark/methods/mlpy/pca.py	(original)
+++ mlpack/conf/jenkins-conf/benchmark/methods/mlpy/pca.py	Mon Aug 26 08:08:16 2013
@@ -55,26 +55,26 @@
 
       try:
         with totalTimer:
-        # Find out what dimension we want.
-        match = re.search('-d (\d+)', options)
+          # Find out what dimension we want.
+          match = re.search('-d (\d+)', options)
 
-        if not match:
-          k = data.shape[1]
-        else:
-          k = int(match.group(1))      
-          if (k > data.shape[1]):
-            Log.Fatal("New dimensionality (" + str(k) + ") cannot be greater "
-                + "than existing dimensionality (" + str(data.shape[1]) + ")!")
-            q.put(-1)
-            return -1
-
-        # Get the options for running PCA.
-        s = True if options.find("-s") > -1 else False
-
-        # Perform PCA.
-        prep = mlpy.PCA(whiten = s)
-        prep.learn(data)
-        out = prep.transform(data, k)      
+          if not match:
+            k = data.shape[1]
+          else:
+            k = int(match.group(1))      
+            if (k > data.shape[1]):
+              Log.Fatal("New dimensionality (" + str(k) + ") cannot be greater "
+                  + "than existing dimensionality (" + str(data.shape[1]) + ")!")
+              q.put(-1)
+              return -1
+
+          # Get the options for running PCA.
+          s = True if options.find("-s") > -1 else False
+
+          # Perform PCA.
+          prep = mlpy.PCA(whiten = s)
+          prep.learn(data)
+          out = prep.transform(data, k)      
       except Exception as e:
         q.put(-1)
         return -1



More information about the mlpack-svn mailing list