- Timestamp:
- 09/11/12 13:29:43 (4 years ago)
- Location:
- branches/UQ/math/legacy
- Files:
-
- 9 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/UQ/math/legacy/TEST_OUQ_1dSurr_CxCy.py
r556 r557 10 10 # optimizer configuration parameters 11 11 ####################################################################### 12 npop = 1 0 #15#20 #32 #40 #!!!12 npop = 15 #10 #20 #32 #40 #!!! 13 13 maxiter = 1000 14 14 maxfun = 1e+6 … … 108 108 109 109 # then test if valid... then impose model validity on product measure 110 if not c.valid_wrt_model(model, tol=target[2], xtol=target[3], \111 maxiter=error[4]):110 if not c.valid_wrt_model(model, ytol=target[2], xtol=target[3], \ 111 imax=target[4]): 112 112 c.set_valid(model, cutoff=target[2], bounds=bounds, tol=error[2], \ 113 constraints=constrain, xtol=target[3], imax=target[4]) 113 constraints=constrain, xtol=target[3], \ 114 maxiter=error[3], imax=error[4]) 114 115 ###################### more function-specific ##################### 115 116 if debug: 116 if not c.valid_wrt_model(model, tol=target[2], xtol=target[3], \117 maxiter=error[4]):117 if not c.valid_wrt_model(model, ytol=target[2], xtol=target[3], \ 118 imax=target[4]): 118 119 print "valid_wrt_model: False" 119 120 if not [sum(w) for w in c.wts] == [1.0] * len(c.wts): … … 141 142 return inf #XXX: FORCE TO SATISFY E CONSTRAINTS 142 143 143 if not c.valid_wrt_model(model, tol=target[2], xtol=target[3], \144 maxiter=error[4]):144 if not c.valid_wrt_model(model, ytol=target[2], xtol=target[3], \ 145 imax=target[4]): 145 146 if debug: print "skipping model-invalidity" 146 147 return inf #XXX: FORCE TO SATISFY E CONSTRAINTS … … 173 174 Cx = (2.0,0.0,0.0) #NOTE: SET THE 'wiggle' HERE! 174 175 valid_tol = 0.0 #NOTE: SET THE 'model tolerance' HERE! 175 iter = 200 #NOTE: SET THE 'Cy-validation maxiter' HERE! 176 imax = 10 #NOTE: SET THE 'Cx-validation maxiter' HERE! 177 target = (y_mean,theta,Cy,Cx,imax) 178 error = (y_mean_error,None,valid_tol,None,iter) 176 imax_c = 200 #NOTE: SET THE 'max iterations to check valid' HERE! 177 imax_i = 10 #NOTE: SET THE 'max inner iterations to set valid' HERE! 178 imax_o = 50 #NOTE: SET THE 'max outer iterations to set valid' HERE! 179 target = (y_mean,theta,Cy,Cx,imax_c) 180 error = (y_mean_error,None,valid_tol,imax_o,imax_i) 179 181 pars = (target,error) 180 182 … … 255 257 256 258 print "fails valid wrt model:\n%s" % \ 257 c.valid_wrt_model(model, xtol=Cx, tol=Cy, blamelist=True, maxiter=iter)259 c.valid_wrt_model(model, xtol=Cx, ytol=Cy, blamelist=True, imax=imax_c) 258 260 print "mean(y): %s >= %s" % (str( c.get_mean_value() ), y_mean - y_mean_error) 259 261 print "sum_wts: %s == 1.0" % [sum(w) for w in c.wts] 260 262 261 263 from paramtrans import graphical_distance 262 Ry = graphical_distance(model, c, tol=Cy, xtol=Cx, cutoff=0.0, maxiter=0)264 Ry = graphical_distance(model, c, ytol=Cy, xtol=Cx, cutoff=0.0, imax=0) 263 265 print "vertical_distance: %s <= %s" % (Ry, Cy + max(Cx)) 264 Rv = graphical_distance(model, c, tol=Cy, xtol=Cx, cutoff=0.0, maxiter=iter)266 Rv = graphical_distance(model, c, ytol=Cy, xtol=Cx, cutoff=0.0, imax=imax_c) 265 267 print "graphical_distance: %s <= %s" % (Rv, Cy) 266 268 -
branches/UQ/math/legacy/TEST_OUQ_1dSurr_Cy.py
r556 r557 108 108 109 109 # then test if valid... then impose model validity on product measure 110 if not c.valid_wrt_model(model, tol=target[2], xtol=target[3], \111 maxiter=error[4]):110 if not c.valid_wrt_model(model, ytol=target[2], xtol=target[3], \ 111 imax=target[4]): 112 112 c.set_valid(model, cutoff=target[2], bounds=bounds, tol=error[2], \ 113 constraints=constrain, xtol=target[3], imax=target[4]) 113 constraints=constrain, xtol=target[3], \ 114 maxiter=error[3], imax=error[4]) 114 115 ###################### more function-specific ##################### 115 116 if debug: 116 if not c.valid_wrt_model(model, tol=target[2], xtol=target[3], \117 maxiter=error[4]):117 if not c.valid_wrt_model(model, ytol=target[2], xtol=target[3], \ 118 imax=target[4]): 118 119 print "valid_wrt_model: False" 119 120 if not [sum(w) for w in c.wts] == [1.0] * len(c.wts): … … 141 142 return inf #XXX: FORCE TO SATISFY E CONSTRAINTS 142 143 143 if not c.valid_wrt_model(model, tol=target[2], xtol=target[3], \144 maxiter=error[4]):144 if not c.valid_wrt_model(model, ytol=target[2], xtol=target[3], \ 145 imax=target[4]): 145 146 if debug: print "skipping model-invalidity" 146 147 return inf #XXX: FORCE TO SATISFY E CONSTRAINTS … … 173 174 Cx = (0.0,0.0,0.0) #NOTE: SET THE 'wiggle' HERE! 174 175 valid_tol = 0.0 #NOTE: SET THE 'model tolerance' HERE! 175 iter = 200 #NOTE: SET THE 'Cy-validation maxiter' HERE! 176 imax = 10 #NOTE: SET THE 'Cx-validation maxiter' HERE! 177 target = (y_mean,theta,Cy,Cx,imax) 178 error = (y_mean_error,None,valid_tol,None,iter) 176 imax_c = 200 #NOTE: SET THE 'max iterations to check valid' HERE! 177 imax_i = 10 #NOTE: SET THE 'max inner iterations to set valid' HERE! 178 imax_o = 50 #NOTE: SET THE 'max outer iterations to set valid' HERE! 179 target = (y_mean,theta,Cy,Cx,imax_c) 180 error = (y_mean_error,None,valid_tol,imax_o,imax_i) 179 181 pars = (target,error) 180 182 … … 255 257 256 258 print "fails valid wrt model:\n%s" % \ 257 c.valid_wrt_model(model, xtol=Cx, tol=Cy, blamelist=True, maxiter=iter)259 c.valid_wrt_model(model, xtol=Cx, ytol=Cy, blamelist=True, imax=imax_c) 258 260 print "mean(y): %s >= %s" % (str( c.get_mean_value() ), y_mean - y_mean_error) 259 261 print "sum_wts: %s == 1.0" % [sum(w) for w in c.wts] 260 262 261 263 from paramtrans import graphical_distance 262 Ry = graphical_distance(model, c, tol=Cy, xtol=Cx, cutoff=0.0, maxiter=0)264 Ry = graphical_distance(model, c, ytol=Cy, xtol=Cx, cutoff=0.0, imax=0) 263 265 print "vertical_distance: %s <= %s" % (Ry, Cy + max(Cx)) 264 Rv = graphical_distance(model, c, tol=Cy, xtol=Cx, cutoff=0.0, maxiter=iter)266 Rv = graphical_distance(model, c, ytol=Cy, xtol=Cx, cutoff=0.0, imax=imax_c) 265 267 print "graphical_distance: %s <= %s" % (Rv, Cy) 266 268 -
branches/UQ/math/legacy/TEST_OUQ_StStSurr_Cy.py
r556 r557 108 108 109 109 # then test if valid... then impose model validity on product measure 110 if not c.valid_wrt_model(model, tol=target[2], xtol=target[3], \111 maxiter=error[4]):110 if not c.valid_wrt_model(model, ytol=target[2], xtol=target[3], \ 111 imax=target[4]): 112 112 c.set_valid(model, cutoff=target[2], bounds=bounds, tol=error[2], \ 113 constraints=constrain, xtol=target[3], imax=target[4]) 113 constraints=constrain, xtol=target[3], \ 114 maxiter=error[3], imax=error[4]) 114 115 ###################### more function-specific ##################### 115 116 if debug: 116 if not c.valid_wrt_model(model, tol=target[2], xtol=target[3], \117 maxiter=error[4]):117 if not c.valid_wrt_model(model, ytol=target[2], xtol=target[3], \ 118 imax=target[4]): 118 119 print "valid_wrt_model: False" 119 120 if not [sum(w) for w in c.wts] == [1.0] * len(c.wts): … … 141 142 return inf #XXX: FORCE TO SATISFY E CONSTRAINTS 142 143 143 if not c.valid_wrt_model(model, tol=target[2], xtol=target[3], \144 maxiter=error[4]):144 if not c.valid_wrt_model(model, ytol=target[2], xtol=target[3], \ 145 imax=target[4]): 145 146 if debug: print "skipping model-invalidity" 146 147 return inf #XXX: FORCE TO SATISFY E CONSTRAINTS … … 173 174 Cx = (0.0,0.0,0.0) #NOTE: SET THE 'wiggle' HERE! 174 175 valid_tol = 0.0 #NOTE: SET THE 'model tolerance' HERE! 175 iter = 200 #NOTE: SET THE 'Cy-validation maxiter' HERE! 176 imax = 10 #NOTE: SET THE 'Cx-validation maxiter' HERE! 177 target = (y_mean,theta,Cy,Cx,imax) 178 error = (y_mean_error,None,valid_tol,None,iter) 176 imax_c = 200 #NOTE: SET THE 'max iterations to check valid' HERE! 177 imax_i = 10 #NOTE: SET THE 'max inner iterations to set valid' HERE! 178 imax_o = 50 #NOTE: SET THE 'max outer iterations to set valid' HERE! 179 target = (y_mean,theta,Cy,Cx,imax_c) 180 error = (y_mean_error,None,valid_tol,imax_o,imax_i) 179 181 pars = (target,error) 180 182 … … 255 257 256 258 print "fails valid wrt model:\n%s" % \ 257 c.valid_wrt_model(model, xtol=Cx, tol=Cy, blamelist=True, maxiter=iter)259 c.valid_wrt_model(model, xtol=Cx, ytol=Cy, blamelist=True, imax=imax_c) 258 260 print "mean(y): %s >= %s" % (str( c.get_mean_value() ), y_mean - y_mean_error) 259 261 print "sum_wts: %s == 1.0" % [sum(w) for w in c.wts] 260 262 261 263 from paramtrans import graphical_distance 262 Ry = graphical_distance(model, c, tol=Cy, xtol=Cx, cutoff=0.0, maxiter=0)264 Ry = graphical_distance(model, c, ytol=Cy, xtol=Cx, cutoff=0.0, imax=0) 263 265 print "vertical_distance: %s <= %s" % (Ry, Cy + max(Cx)) 264 Rv = graphical_distance(model, c, tol=Cy, xtol=Cx, cutoff=0.0, maxiter=iter)266 Rv = graphical_distance(model, c, ytol=Cy, xtol=Cx, cutoff=0.0, imax=imax_c) 265 267 print "graphical_distance: %s <= %s" % (Rv, Cy) 266 268 -
branches/UQ/math/legacy/dirac_measure.py
r556 r557 521 521 522 522 Additional Inputs: 523 tol -- maximum acceptable difference |y - F(x')|; a single value523 ytol -- maximum acceptable difference |y - F(x')|; a single value 524 524 xtol -- maximum acceptable difference |x - x'|; an iterable or single value 525 cutoff -- zero out distances less than cutoff; typically: tol, 0.0, or None525 cutoff -- zero out distances less than cutoff; typically: ytol, 0.0, or None 526 526 527 527 Notes: 528 xtol defines the n-dimensional base of a pilar of height tol, centered at528 xtol defines the n-dimensional base of a pilar of height ytol, centered at 529 529 each point. The region inside the pilar defines the space where a "valid" 530 530 model must intersect. If xtol is not specified, then the base of the pilar 531 531 will be a dirac at x' = x. This function performs an optimization for each 532 x to find an appropriate x'. While cutoff and tol are very tightly related,533 they play a distinct role; tol is used to set the optimization termination532 x to find an appropriate x'. While cutoff and ytol are very tightly related, 533 they play a distinct role; ytol is used to set the optimization termination 534 534 for an acceptable |y - F(x')|, while cutoff is applied post-optimization. 535 535 """ … … 940 940 from legacydata import dataset 941 941 from paramtrans import lipschitz_distance, infeasibility, _npts 942 if isinstance(guess, type(None)):942 if guess is None: 943 943 message = "Requires a guess scenario, or a tuple of scenario dimensions." 944 944 raise TypeError, message … … 1057 1057 1058 1058 Inputs: 1059 cutoff -- acceptable model invalidity |y - F(x')|1059 cutoff -- maximum acceptable model invalidity |y - F(x')|; a single value 1060 1060 model -- the model function, y' = F(x'), that approximates reality, y = G(x) 1061 1061 guess -- the scenario providing an initial guess at validity, … … 1083 1083 from numpy import sum as _sum, asarray 1084 1084 from paramtrans import graphical_distance, infeasibility, _npts 1085 if isinstance(guess, type(None)):1085 if guess is None: 1086 1086 message = "Requires a guess scenario, or a tuple of scenario dimensions." 1087 1087 raise TypeError, message … … 1096 1096 1097 1097 # prepare bounds for solver 1098 bounds = None 1099 if kwds.has_key('bounds'): 1100 bounds = kwds.pop('bounds') 1098 bounds = kwds.pop('bounds', None) 1101 1099 # if bounds are not set, use the default optimizer bounds 1102 1100 if bounds == None: … … 1112 1110 1113 1111 # plug in the 'constraints' function: param' = constraints(param) 1114 constraints = None # default is no constraints 1115 if kwds.has_key('constraints'): constraints = kwds.pop('constraints') 1112 constraints = kwds.pop('constraints', None) # default is no constraints 1116 1113 if not constraints: # if None (default), there are no constraints 1117 1114 constraints = lambda x: x 1118 1115 1119 # 'wiggle room' tolerance in x 1120 xtol = 0.0 # default 1121 if kwds.has_key('xtol'): xtol = kwds['xtol'] 1122 npop = 20 #None #XXX: tune npop (outer optimization)? 1123 if kwds.has_key('npop'): npop = kwds.pop('npop') 1124 maxiter = 50 #XXX: tune maxiter (outer optimization)? 1125 if kwds.has_key('maxiter'): maxiter = kwds.pop('maxiter') 1116 # 'wiggle room' tolerances 1117 ipop = kwds.pop('ipop', 10) #XXX: tune ipop (inner optimization)? 1118 imax = kwds.pop('imax', 10) #XXX: tune imax (inner optimization)? 1126 1119 # tolerance for optimization on sum(y) 1127 tol = 0.0 # default 1128 if kwds.has_key('tol'): tol = kwds.pop('tol') 1129 ipop = 10 #XXX: tune npop (inner optimization)? 1130 if kwds.has_key('ipop'): ipop = kwds.pop('ipop') 1131 imax = 10 #XXX: tune maxiter (inner optimization)? 1132 if kwds.has_key('imax'): imax = kwds.pop('imax') 1120 tol = kwds.pop('tol', 0.0) # default 1121 npop = kwds.pop('npop', 20) #XXX: tune npop (outer optimization)? 1122 maxiter = kwds.pop('maxiter', 1000) #XXX: tune maxiter (outer optimization)? 1133 1123 1134 1124 # if no guess was made, then use bounds constraints 1135 if guess ==None:1125 if guess is None: 1136 1126 if npop: 1137 1127 guess = bounds … … 1147 1137 points.load(rv, pts) 1148 1138 # calculate infeasibility 1149 Rv = graphical_distance(model, points, tol=cutoff, npop=ipop, \1150 maxiter=imax, **kwds)1139 Rv = graphical_distance(model, points, ytol=cutoff, ipop=ipop, \ 1140 imax=imax, **kwds) 1151 1141 v = infeasibility(Rv, cutoff) 1152 1142 # converting v to E -
branches/UQ/math/legacy/legacydata.py
r547 r557 325 325 cutoff = tol # default is to zero out distances less than tolerance 326 326 if kwds.has_key('cutoff'): cutoff = kwds['cutoff'] 327 if isinstance(cutoff, bool): 328 if cutoff: cutoff = tol 329 else: cutoff = None 327 if cutoff is True: cutoff = tol 328 elif cutoff is False: cutoff = None 330 329 331 330 if L == None: L = self.lipschitz … … 356 355 357 356 Additional Inputs: 358 tol -- maximum acceptable difference |y - F(x')|; a single value357 ytol -- maximum acceptable difference |y - F(x')|; a single value 359 358 xtol -- maximum acceptable difference |x - x'|; an iterable or single value 360 cutoff -- zero out distances less than cutoff; typically: tol, 0.0, or None359 cutoff -- zero out distances less than cutoff; typically: ytol, 0.0, or None 361 360 362 361 Notes: 363 xtol defines the n-dimensional base of a pilar of height tol, centered at362 xtol defines the n-dimensional base of a pilar of height ytol, centered at 364 363 each point. The region inside the pilar defines the space where a "valid" 365 364 model must intersect. If xtol is not specified, then the base of the pilar 366 365 will be a dirac at x' = x. This function performs an optimization for each 367 x to find an appropriate x'. While cutoff and tol are very tightly related,368 they play a distinct role; tol is used to set the optimization termination366 x to find an appropriate x'. While cutoff and ytol are very tightly related, 367 they play a distinct role; ytol is used to set the optimization termination 369 368 for an acceptable |y - F(x')|, while cutoff is applied post-optimization. 370 369 """ 371 # get tolerance in y 372 tol = 0.0 373 if kwds.has_key('tol'): tol = kwds['tol'] 374 cutoff = tol # default is to zero out distances less than tolerance 375 if kwds.has_key('cutoff'): cutoff = kwds['cutoff'] 376 if isinstance(cutoff, bool): 377 if cutoff: cutoff = tol 378 else: cutoff = None 370 ytol = kwds.get('ytol', 0.0) # get tolerance in y 371 # default is to zero out distances less than tolerance 372 cutoff = kwds.get('cutoff', ytol) 373 if cutoff is True: cutoff = ytol 374 elif cutoff is False: cutoff = None 379 375 380 376 from paramtrans import graphical_distance, is_feasible -
branches/UQ/math/legacy/paramtrans.py
r556 r557 267 267 cutoff = tol # default is to zero out distances less than tolerance 268 268 if kwds.has_key('cutoff'): cutoff = kwds.pop('cutoff') 269 if isinstance(cutoff, bool): 270 if cutoff: cutoff = tol 271 else: cutoff = None 269 if cutoff is True: cutoff = tol 270 elif cutoff is False: cutoff = None 272 271 273 272 # calculate the distance matrix … … 288 287 289 288 Additional Inputs: 290 tol = maximum acceptable difference |y - F(x')|; a single value289 ytol = maximum acceptable difference |y - F(x')|; a single value 291 290 xtol = maximum acceptable difference |x - x'|; an iterable or single value 292 cutoff = zero out distances less than cutoff; typically: tol, 0.0, or None291 cutoff = zero out distances less than cutoff; typically: ytol, 0.0, or None 293 292 294 293 Returns: … … 296 295 297 296 Notes: 298 xtol defines the n-dimensional base of a pilar of height tol, centered at297 xtol defines the n-dimensional base of a pilar of height ytol, centered at 299 298 each point. The region inside the pilar defines the space where a "valid" 300 299 model must intersect. If xtol is not specified, then the base of the pilar 301 300 will be a dirac at x' = x. This function performs an optimization for each 302 x to find an appropriate x'. While cutoff and tol are very tightly related,303 they play a distinct role; tol is used to set the optimization termination301 x to find an appropriate x'. While cutoff and ytol are very tightly related, 302 they play a distinct role; ytol is used to set the optimization termination 304 303 for an acceptable |y - F(x')|, while cutoff is applied post-optimization. 305 304 """ … … 327 326 328 327 # get tolerance in y and wiggle room in x 329 tol = 0.0330 if kwds.has_key(' tol'): tol = kwds.pop('tol')328 ytol = 0.0 329 if kwds.has_key('ytol'): ytol = kwds.pop('ytol') 331 330 xtol = 0.0 # default is to not allow 'wiggle room' in x 332 331 if kwds.has_key('xtol'): xtol = kwds.pop('xtol') 333 332 334 cutoff = tol # default is to zero out distances less than tolerance333 cutoff = ytol # default is to zero out distances less than tolerance 335 334 if kwds.has_key('cutoff'): cutoff = kwds.pop('cutoff') 336 if isinstance(cutoff, bool): 337 if cutoff: cutoff = tol 338 else: cutoff = None 339 npop = min(20, 3*nxi) #XXX: tune npop? 340 if kwds.has_key('npop'): npop = kwds.pop('npop') 341 imax = 1000 #XXX: tune maxiter? 342 if kwds.has_key('maxiter'): imax = kwds.pop('maxiter') 335 if cutoff is True: cutoff = ytol 336 elif cutoff is False: cutoff = None 337 ipop = min(20, 3*nxi) #XXX: tune ipop? 338 if kwds.has_key('ipop'): ipop = kwds.pop('ipop') 339 imax = 1000 #XXX: tune imax? 340 if kwds.has_key('imax'): imax = kwds.pop('imax') 343 341 344 342 ######################################################################### 345 def radius(model, point, tol=0.0, xtol=0.0, npop=None, maxiter=None):343 def radius(model, point, ytol=0.0, xtol=0.0, ipop=None, imax=None): 346 344 """graphical distance between a single point x,y and a model F(x')""" 347 345 # given a single point x,y: find the radius = |y - F(x')| … … 350 348 # |x - x'| <= xtol (for each i in x) 351 349 # 352 # if npop, then DE else Powell; tol is used in VTR(tol)353 # and will terminate when cost <= tol350 # if ipop, then DE else Powell; ytol is used in VTR(ytol) 351 # and will terminate when cost <= ytol 354 352 x,y = _get_xy(point) 355 353 y = asarray(y) … … 366 364 # if xtol=0, radius is difference in x,y and x,F(x); skip the optimization 367 365 try: 368 if not maxiteror not max(xtol): #iterables366 if not imax or not max(xtol): #iterables 369 367 return cost(x) 370 368 except TypeError: … … 381 379 #XXX: edit settings? 382 380 MINMAX = 1 #XXX: confirm MINMAX=1 is minimization 383 if npop: # use VTR384 results = diffev2(cost, x, npop, ftol=tol, gtol=None, \385 itermon = stepmon, maxiter= maxiter, bounds=bounds, \381 if ipop: # use VTR 382 results = diffev2(cost, x, ipop, ftol=ytol, gtol=None, \ 383 itermon = stepmon, maxiter=imax, bounds=bounds, \ 386 384 full_output=1, disp=0, handler=False) 387 385 else: # use VTR 388 results = fmin_powell(cost, x, ftol= tol, gtol=None, \389 itermon = stepmon, maxiter= maxiter, bounds=bounds, \386 results = fmin_powell(cost, x, ftol=ytol, gtol=None, \ 387 itermon = stepmon, maxiter=imax, bounds=bounds, \ 390 388 full_output=1, disp=0, handler=False) 391 389 #solved = results[0] # x' … … 400 398 401 399 #XXX: better to do a single optimization rather than for each point ??? 402 d = [radius(model, point, tol, xtol, npop, imax) for point in target]400 d = [radius(model, point, ytol, xtol, ipop, imax) for point in target] 403 401 return infeasibility(d, cutoff) 404 402 … … 543 541 544 542 print "\ntesting shortness, feasibility, validity..." 545 model = lambda x:x546 543 assert pm.short_wrt_data(b) == True 547 544 b.lipschitz = L … … 552 549 assert pm.short_wrt_data(b) == True 553 550 554 _tol = 0.0 555 b.lipschitz = L 556 from numpy import max as nmax 557 558 self_violate = pm.valid_wrt_model(model, tol=_tol) 559 print "maximum violation (self): %s" % self_violate 560 data_violate = b.valid(model, tol=_tol) 561 print "maximum violation (data): %s" % data_violate 551 Cy = 0.1; Cx = 0.0 552 model = lambda x:x[0] 553 assert b.valid(model, ytol=Cy, xtol=Cx) == False 554 assert pm.valid_wrt_model(model, ytol=Cy, xtol=Cx) == False 555 pm.set_valid(model, cutoff=Cy, xtol=Cx) 556 assert pm.valid_wrt_model(model, ytol=Cy, xtol=Cx) == True 562 557 print "...done\n" 563 558 -
branches/UQ/math/legacy/test_ExampleDataset.py
r556 r557 63 63 64 64 # Check model validity 65 Rv = ex1d_data.valid(F, xtol=Cx, tol=Cy, \65 Rv = ex1d_data.valid(F, xtol=Cx, ytol=Cy, \ 66 66 raw=True, blamelist=False, pairs=False, all=False) 67 67 print("valid(ytol=%s,xtol=%s):\n%s" % (Cy, Cx, Rv)) -
branches/UQ/math/legacy/test_ModeledDataset.py
r556 r557 43 43 # Check model validity 44 44 Cx = 0.0; Cy = 1.0 45 Rv = data.valid(F, xtol=Cx, tol=Cy, \45 Rv = data.valid(F, xtol=Cx, ytol=Cy, \ 46 46 raw=False, blamelist=False, pairs=False, all=True) 47 47 print("valid(ytol=%s,xtol=%s):\n%s" % (Cy, Cx, Rv)) 48 48 49 49 Cx = 0.0; Cy = 2.0 50 Rv = data.valid(F, xtol=Cx, tol=Cy, \50 Rv = data.valid(F, xtol=Cx, ytol=Cy, \ 51 51 raw=False, blamelist=False, pairs=False, all=True) 52 52 print("valid(ytol=%s,xtol=%s):\n%s" % (Cy, Cx, Rv)) 53 53 54 54 Cx = 1.0; Cy = 2.0 55 Rv = data.valid(F, xtol=Cx, tol=Cy, \55 Rv = data.valid(F, xtol=Cx, ytol=Cy, \ 56 56 raw=False, blamelist=False, pairs=False, all=True) 57 57 print("valid(ytol=%s,xtol=%s):\n%s" % (Cy, Cx, Rv)) 58 58 59 59 Cx = 2.0; Cy = 2.0 60 Rv = data.valid(F, xtol=Cx, tol=Cy, \60 Rv = data.valid(F, xtol=Cx, ytol=Cy, \ 61 61 raw=False, blamelist=False, pairs=False, all=True) 62 62 print("valid(ytol=%s,xtol=%s):\n%s" % (Cy, Cx, Rv)) -
branches/UQ/math/legacy/test_StAlDataset.py
r556 r557 53 53 54 54 # Check model validity 55 Rv = st_al_data.valid(F, xtol=Cx, tol=Cy, \55 Rv = st_al_data.valid(F, xtol=Cx, ytol=Cy, \ 56 56 raw=True, blamelist=False, pairs=False, all=False) 57 57 print("valid(ytol=%s,xtol=%s):\n%s" % (Cy, Cx, Rv))
Note: See TracChangeset
for help on using the changeset viewer.