Changeset 552 for branches


Ignore:
Timestamp:
09/05/12 16:09:26 (4 years ago)
Author:
tjs
Message:

Added 'sausage' branch with working OUQ sausage code using OUQPolytopeTools.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/UQ/math/legacy/TEST_OUQ_1dSurr_diam.py

    r546 r552  
    1111# hard-wired: use DE solver, don't use mpi, F-F' calculation 
    1212####################################################################### 
    13 npop = 32 #20 #40  #!!! 
     13npop = 20 #20 #40  #!!! 
    1414maxiter = 1000 
    1515maxfun = 1e+6 
     
    2222# the model function and the dataset 
    2323####################################################################### 
    24 from StAlSurrogate import st_al_surr as model 
    25 from legacydata import load_dataset 
    26 data = load_dataset('ExampleDataset.txt', range(0,1)) 
    27 L = data.lipschitz 
    28  
     24#from StAlSurrogate import st_al_surr as model 
     25#from legacydata import load_dataset 
     26#data = load_dataset('ExampleDataset.txt', range(0,1)) 
     27#L = data.lipschitz 
     28 
     29def model(x): 
     30  return x[0]; 
    2931 
    3032####################################################################### 
     
    170172  from mystic.math.measures import mean 
    171173  y_mean = 0.5     #NOTE: SET THE 'mean' HERE! 
    172   y_error = 0.0001 #NOTE: SET THE 'error' HERE! 
     174  y_mean_error = 0.0 #NOTE: SET THE 'error' HERE! 
    173175  theta = 0.0      #NOTE: SET THE 'failure criteria' HERE! 
    174   Cy = 25.0          #NOTE: SET THE 'cutoff' HERE! 
    175   Cx = (1.0,1.0,1.0) #NOTE: SET THE 'wiggle' HERE! 
    176   valid_tol = 1.e-5  #NOTE: SET THE 'model tolerance' HERE! 
    177   target = (y_mean,theta,Cy,Cx); error = (y_error,None,valid_tol,None) 
     176  Cy = 1.0          #NOTE: SET THE 'cutoff' HERE! 
     177  Cx = (0.0,0.0,0.0) #NOTE: SET THE 'wiggle' HERE! 
     178  valid_tol = 1.e-6  #NOTE: SET THE 'model tolerance' HERE! 
     179  target = (y_mean,theta,Cy,Cx); error = (y_mean_error,None,valid_tol,None) 
    178180  pars = (target,error) 
    179181 
     
    186188 
    187189  #FIXME: check units versus those in model and in dataset 
    188   w_lower = [0.0]; Y_lower = [0.0] 
    189   w_upper = [1.0]; Y_upper = [1.0] 
     190  w_lower = [0.0]; Y_lower = [theta] 
     191  w_upper = [1.0]; Y_upper = [5.0] 
    190192  h_lower = [0.0]; a_lower = [0.0];  v_lower = [0.0] 
    191193  h_upper = [1.0]; a_upper = [0.0];  v_upper = [0.0] 
     
    218220 
    219221  print " model: f(x) = %s(x)" % function_name 
    220   print " lipschitz: L = %s" % L 
     222  #print " lipschitz constant: L = %s" % L 
    221223  print " target: %s" % str(target) 
    222224  print " error: %s" % str(error) 
Note: See TracChangeset for help on using the changeset viewer.