Mercurial > hg > pycsalgos
changeset 49:04f8ae8d3eef
Added std1nesta and std2nesta
author | nikcleju |
---|---|
date | Thu, 01 Dec 2011 00:42:56 +0000 |
parents | f6824da67b51 |
children | 272992ba5129 |
files | scripts/ABSapprox.py |
diffstat | 1 files changed, 60 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/scripts/ABSapprox.py Thu Dec 01 00:22:41 2011 +0000 +++ b/scripts/ABSapprox.py Thu Dec 01 00:42:56 2011 +0000 @@ -310,6 +310,66 @@ return algosN,algosL,d,sigma,deltas,rhos,lambdas,numvects,SNRdb,dosavedata,savedataname,\ doshowplot,dosaveplot,saveplotbase,saveplotexts +# Standard parameters 1nesta +# 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 to std1 but with only NESTA +def std1nesta(): + # 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 = 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_std1nesta.mat' + doshowplot = False + dosaveplot = True + saveplotbase = 'approx_pt_std1nesta_' + saveplotexts = ('png','pdf','eps') + + return algosN,algosL,d,sigma,deltas,rhos,lambdas,numvects,SNRdb,dosavedata,savedataname,\ + doshowplot,dosaveplot,saveplotbase,saveplotexts + +# Standard parameters 2nesta +# 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 with std2, but with only NESTA +def std2nesta(): + # 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 = 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_std2nesta.mat' + doshowplot = False + dosaveplot = True + saveplotbase = 'approx_pt_std2nesta_' + saveplotexts = ('png','pdf','eps') + + return algosN,algosL,d,sigma,deltas,rhos,lambdas,numvects,SNRdb,dosavedata,savedataname,\ + doshowplot,dosaveplot,saveplotbase,saveplotexts + #========================== # Interface run functions #==========================