- Timestamp:
- 09/05/12 16:09:26 (4 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/UQ/math/legacy/TEST_OUQ_1dSurr_diam.py
r546 r552 11 11 # hard-wired: use DE solver, don't use mpi, F-F' calculation 12 12 ####################################################################### 13 npop = 32#20 #40 #!!!13 npop = 20 #20 #40 #!!! 14 14 maxiter = 1000 15 15 maxfun = 1e+6 … … 22 22 # the model function and the dataset 23 23 ####################################################################### 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 29 def model(x): 30 return x[0]; 29 31 30 32 ####################################################################### … … 170 172 from mystic.math.measures import mean 171 173 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! 173 175 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) 178 180 pars = (target,error) 179 181 … … 186 188 187 189 #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] 190 192 h_lower = [0.0]; a_lower = [0.0]; v_lower = [0.0] 191 193 h_upper = [1.0]; a_upper = [0.0]; v_upper = [0.0] … … 218 220 219 221 print " model: f(x) = %s(x)" % function_name 220 print " lipschitz: L = %s" % L222 #print " lipschitz constant: L = %s" % L 221 223 print " target: %s" % str(target) 222 224 print " error: %s" % str(error)
Note: See TracChangeset
for help on using the changeset viewer.