changeset 38:aa3e89435a2a

Renamed std2 to stdtest, and added std2 with d=20 and sigma=10
author nikcleju
date Thu, 17 Nov 2011 17:41:31 +0000
parents afcfd4d1d548
children 0ff08ae833be
files scripts/ABSapprox.py
diffstat 1 files changed, 43 insertions(+), 44 deletions(-) [+]
line wrap: on
line diff
--- a/scripts/ABSapprox.py	Thu Nov 17 17:29:54 2011 +0000
+++ b/scripts/ABSapprox.py	Thu Nov 17 17:41:31 2011 +0000
@@ -140,21 +140,50 @@
 #==========================
 # Standard parameters
 #==========================
+# Standard parameters for quick testing
+# Algorithms: GAP, SL0 and BP
+# d=50, sigma = 2, delta and rho only 3 x 3, lambdas = 0, 1e-4, 1e-2, 1, 100, 10000
+# Do save data, do save plots, don't show plots
+# Useful for short testing 
+def stdtest():
+  # Define which algorithms to run
+  algosN = gap,      # tuple of algorithms not depending on lambda
+  algosL = sl0,bp    # tuple of algorithms depending on lambda (our ABS approach)
+  
+  d = 50.0
+  sigma = 2.0
+  deltas = np.array([0.05, 0.45, 0.95])
+  rhos = np.array([0.05, 0.45, 0.95])
+  numvects = 10; # Number of vectors to generate
+  SNRdb = 20.;    # This is norm(signal)/norm(noise), so power, not energy
+  # Values for lambda
+  #lambdas = [0 10.^linspace(-5, 4, 10)];
+  lambdas = np.array([0., 0.0001, 0.01, 1, 100, 10000])
+  
+  dosavedata = True
+  savedataname = 'approx_pt_stdtest.mat'
+  doshowplot = False
+  dosaveplot = True
+  saveplotbase = 'approx_pt_stdtest_'
+  saveplotexts = ('png','pdf','eps')
+
+  return algosN,algosL,d,sigma,deltas,rhos,lambdas,numvects,SNRdb,dosavedata,savedataname,\
+          doshowplot,dosaveplot,saveplotbase,saveplotexts   
+
+
 # Standard parameters 1
-# All algorithms
+# All algorithms, 100 vectors
 # d=50, sigma = 2, delta and rho full resolution (0.05 step), lambdas = 0, 1e-4, 1e-2, 1, 100, 10000
 # Do save data, do save plots, don't show plots
 def std1():
   # Define which algorithms to run
-  algosN = gap,                 # tuple of algorithms not depending on lambda
+  algosN = gap,sl0analysis,bpanalysis               # tuple of algorithms not depending on lambda
   algosL = sl0,bp,ompeps,tst    # tuple of algorithms depending on lambda (our ABS approach)
   
   d = 50.0;
   sigma = 2.0
   deltas = np.arange(0.05,1.,0.05)
   rhos = np.arange(0.05,1.,0.05)
-  #deltas = np.array([0.05, 0.45, 0.95])
-  #rhos = np.array([0.05, 0.45, 0.95])
   numvects = 100; # Number of vectors to generate
   SNRdb = 20.;    # This is norm(signal)/norm(noise), so power, not energy
   # Values for lambda
@@ -171,51 +200,21 @@
   return algosN,algosL,d,sigma,deltas,rhos,lambdas,numvects,SNRdb,dosavedata,savedataname,\
           doshowplot,dosaveplot,saveplotbase,saveplotexts
           
+         
 # Standard parameters 2
-# Algorithms: GAP, SL0 and BP
-# d=50, sigma = 2, delta and rho only 3 x 3, lambdas = 0, 1e-4, 1e-2, 1, 100, 10000
+# All algorithms, 100 vectors
+# d=20, sigma = 10, delta and rho full resolution (0.05 step), lambdas = 0, 1e-4, 1e-2, 1, 100, 10000
 # Do save data, do save plots, don't show plots
-# Useful for short testing 
 def std2():
   # Define which algorithms to run
-  algosN = gap,      # tuple of algorithms not depending on lambda
-  algosL = sl0,bp    # tuple of algorithms depending on lambda (our ABS approach)
+  algosN = gap,sl0analysis,bpanalysis      # tuple of algorithms not depending on lambda
+  algosL = sl0,bp,ompeps,tst    # tuple of algorithms depending on lambda (our ABS approach)
   
-  d = 50.0
-  sigma = 2.0
-  deltas = np.array([0.05, 0.45, 0.95])
-  rhos = np.array([0.05, 0.45, 0.95])
-  numvects = 10; # Number of vectors to generate
-  SNRdb = 20.;    # This is norm(signal)/norm(noise), so power, not energy
-  # Values for lambda
-  #lambdas = [0 10.^linspace(-5, 4, 10)];
-  lambdas = np.array([0., 0.0001, 0.01, 1, 100, 10000])
-  
-  dosavedata = True
-  savedataname = 'approx_pt_std2.mat'
-  doshowplot = False
-  dosaveplot = True
-  saveplotbase = 'approx_pt_std2_'
-  saveplotexts = ('png','pdf','eps')
-
-  return algosN,algosL,d,sigma,deltas,rhos,lambdas,numvects,SNRdb,dosavedata,savedataname,\
-          doshowplot,dosaveplot,saveplotbase,saveplotexts    
-          
-# Standard parameters 3
-# Algorithms: GAP, SL0a and SL0a2
-# d=50, sigma = 2, delta and rho only 3 x 3, lambdas = 0, 1e-4, 1e-2, 1, 100, 10000
-# Do save data, do save plots, don't show plots
-# Useful for short testing 
-def std3():
-  # Define which algorithms to run
-  algosN = gap,sl0analysis,bpanalysis      # tuple of algorithms not depending on lambda
-  algosL = sl0,bp    # tuple of algorithms depending on lambda (our ABS approach)
-  
-  d = 50.0
-  sigma = 2.0
-  deltas = np.array([0.05, 0.45, 0.95])
-  rhos = np.array([0.05, 0.45, 0.95])
-  numvects = 10; # Number of vectors to generate
+  d = 20.0
+  sigma = 10.0
+  deltas = np.arange(0.05,1.,0.05)
+  rhos = np.arange(0.05,1.,0.05)
+  numvects = 100; # Number of vectors to generate
   SNRdb = 20.;    # This is norm(signal)/norm(noise), so power, not energy
   # Values for lambda
   #lambdas = [0 10.^linspace(-5, 4, 10)];