# HG changeset patch # User nikcleju # Date 1322777479 0 # Node ID 272992ba5129f09be814560e57949153ab2830c8 # Parent 04f8ae8d3eef3f2e012c14ee64c07f789edf11bc Added std3nesta and std4nesta diff -r 04f8ae8d3eef -r 272992ba5129 scripts/ABSapprox.py --- a/scripts/ABSapprox.py Thu Dec 01 00:42:56 2011 +0000 +++ b/scripts/ABSapprox.py Thu Dec 01 22:11:19 2011 +0000 @@ -369,6 +369,66 @@ return algosN,algosL,d,sigma,deltas,rhos,lambdas,numvects,SNRdb,dosavedata,savedataname,\ doshowplot,dosaveplot,saveplotbase,saveplotexts + + # Standard parameters 3nesta +# Only NESTA, 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 +# IDENTICAL with 3 but with only NESTA +def std3nesta(): + # Define which algorithms to run + algosN = nesta, # tuple of algorithms not depending on lambda + algosL = () # 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) + numvects = 100; # Number of vectors to generate + SNRdb = 10.; # 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_std3nesta.mat' + doshowplot = False + dosaveplot = True + saveplotbase = 'approx_pt_std3nesta_' + saveplotexts = ('png','pdf','eps') + + return algosN,algosL,d,sigma,deltas,rhos,lambdas,numvects,SNRdb,dosavedata,savedataname,\ + doshowplot,dosaveplot,saveplotbase,saveplotexts + +# Standard parameters 4nesta +# Only NESTA, 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 +# Identical to 4 but with only NESTA +def std4nesta(): + # Define which algorithms to run + algosN = nesta, # tuple of algorithms not depending on lambda + algosL = () # tuple of algorithms depending on lambda (our ABS approach) + + 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 = 10.; # 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_std4nesta.mat' + doshowplot = False + dosaveplot = True + saveplotbase = 'approx_pt_std4nesta_' + saveplotexts = ('png','pdf','eps') + + return algosN,algosL,d,sigma,deltas,rhos,lambdas,numvects,SNRdb,dosavedata,savedataname,\ + doshowplot,dosaveplot,saveplotbase,saveplotexts #========================== # Interface run functions