- Timestamp:
- 09/24/12 15:59:25 (4 years ago)
- Location:
- branches/UQ/math
- Files:
-
- 14 deleted
- 12 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/UQ/math/legacy/MINMAX_StAlData.py
r556 r569 17 17 # the dataset 18 18 ####################################################################### 19 from legacydata import load_dataset19 from mystic.math.legacydata import load_dataset 20 20 data = load_dataset('StAlDataset.txt') 21 21 … … 67 67 def maximize(params,npts,bounds): 68 68 69 from dirac_measure import scenario69 from mystic.math.dirac_measure import scenario 70 70 from numpy import inf 71 71 target,error = params … … 96 96 ##################### begin function-specific ##################### 97 97 # impose norm on the weights of the discrete measures 98 from dirac_measure import norm_wts_constraintsFactory as factory98 from mystic.math.dirac_measure import norm_wts_constraintsFactory as factory 99 99 constrain = factory(npts) 100 100 … … 158 158 nz = 1 #NOTE: SET THE NUMBER OF 'v' POINTS HERE! 159 159 npts = (nx,ny,nz) 160 from paramtrans import _npts160 from mystic.math.paramtrans import _npts 161 161 _n = _npts(npts) 162 162 … … 219 219 220 220 from numpy import array 221 from dirac_measure import scenario221 from mystic.math.dirac_measure import scenario 222 222 c = scenario() 223 223 c.load(solved,npts) -
branches/UQ/math/legacy/MM_OUQ_StAlData.py
r556 r569 23 23 # the dataset 24 24 ####################################################################### 25 from legacydata import load_dataset25 from mystic.math.legacydata import load_dataset 26 26 data = load_dataset('StAlDataset.txt') 27 27 … … 75 75 def maximize(params,npts,bounds): 76 76 77 from dirac_measure import scenario77 from mystic.math.dirac_measure import scenario 78 78 from numpy import inf 79 79 target,error = params … … 104 104 ##################### begin function-specific ##################### 105 105 # impose mean on the values of the product measure 106 from dirac_measure import mean_y_norm_wts_constraintsFactory as factory106 from mystic.math.dirac_measure import mean_y_norm_wts_constraintsFactory as factory 107 107 constrain = factory((target[0],error[0]), npts) 108 108 … … 187 187 nz = 2 #NOTE: SET THE NUMBER OF 'v' POINTS HERE! 188 188 npts = (nx,ny,nz) 189 from paramtrans import _npts189 from mystic.math.paramtrans import _npts 190 190 _n = _npts(npts) 191 191 … … 250 250 251 251 from numpy import array 252 from dirac_measure import scenario252 from mystic.math.dirac_measure import scenario 253 253 c = scenario() 254 254 c.load(solved,npts) -
branches/UQ/math/legacy/TEST_OUQ_1dData.py
r556 r569 21 21 # the dataset 22 22 ####################################################################### 23 from legacydata import load_dataset23 from mystic.math.legacydata import load_dataset 24 24 data = load_dataset('ExampleDataset.txt', range(0,1)) 25 25 … … 71 71 def maximize(params,npts,bounds): 72 72 73 from dirac_measure import scenario73 from mystic.math.dirac_measure import scenario 74 74 from numpy import inf 75 75 target,error = params … … 100 100 ##################### begin function-specific ##################### 101 101 # impose mean on the values of the product measure 102 from dirac_measure import mean_y_norm_wts_constraintsFactory as factory102 from mystic.math.dirac_measure import mean_y_norm_wts_constraintsFactory as factory 103 103 constrain = factory((target[0],error[0]), npts) 104 104 … … 183 183 nz = 1 #NOTE: SET THE NUMBER OF 'v' POINTS HERE! 184 184 npts = (nx,ny,nz) 185 from paramtrans import _npts185 from mystic.math.paramtrans import _npts 186 186 _n = _npts(npts) 187 187 … … 246 246 247 247 from numpy import array 248 from dirac_measure import scenario248 from mystic.math.dirac_measure import scenario 249 249 c = scenario() 250 250 c.load(solved,npts) -
branches/UQ/math/legacy/TEST_OUQ_1dSurr_CxCy.py
r557 r569 70 70 def maximize(params,npts,bounds): 71 71 72 from dirac_measure import scenario72 from mystic.math.dirac_measure import scenario 73 73 from numpy import inf 74 74 target,error = params … … 99 99 ##################### begin function-specific ##################### 100 100 # impose mean on the values of the product measure 101 from dirac_measure import mean_y_norm_wts_constraintsFactory as factory101 from mystic.math.dirac_measure import mean_y_norm_wts_constraintsFactory as factory 102 102 constrain = factory((target[0],error[0]), npts) 103 103 … … 185 185 nz = 1 #NOTE: SET THE NUMBER OF 'v' POINTS HERE! 186 186 npts = (nx,ny,nz) 187 from paramtrans import _npts187 from mystic.math.paramtrans import _npts 188 188 _n = _npts(npts) 189 189 … … 247 247 248 248 from numpy import array 249 from dirac_measure import scenario249 from mystic.math.dirac_measure import scenario 250 250 c = scenario() 251 251 c.load(solved,npts) … … 261 261 print "sum_wts: %s == 1.0" % [sum(w) for w in c.wts] 262 262 263 from paramtrans import graphical_distance263 from mystic.math.paramtrans import graphical_distance 264 264 Ry = graphical_distance(model, c, ytol=Cy, xtol=Cx, cutoff=0.0, imax=0) 265 265 print "vertical_distance: %s <= %s" % (Ry, Cy + max(Cx)) -
branches/UQ/math/legacy/TEST_OUQ_1dSurr_Cy.py
r557 r569 70 70 def maximize(params,npts,bounds): 71 71 72 from dirac_measure import scenario72 from mystic.math.dirac_measure import scenario 73 73 from numpy import inf 74 74 target,error = params … … 99 99 ##################### begin function-specific ##################### 100 100 # impose mean on the values of the product measure 101 from dirac_measure import mean_y_norm_wts_constraintsFactory as factory101 from mystic.math.dirac_measure import mean_y_norm_wts_constraintsFactory as factory 102 102 constrain = factory((target[0],error[0]), npts) 103 103 … … 185 185 nz = 1 #NOTE: SET THE NUMBER OF 'v' POINTS HERE! 186 186 npts = (nx,ny,nz) 187 from paramtrans import _npts187 from mystic.math.paramtrans import _npts 188 188 _n = _npts(npts) 189 189 … … 247 247 248 248 from numpy import array 249 from dirac_measure import scenario249 from mystic.math.dirac_measure import scenario 250 250 c = scenario() 251 251 c.load(solved,npts) … … 261 261 print "sum_wts: %s == 1.0" % [sum(w) for w in c.wts] 262 262 263 from paramtrans import graphical_distance263 from mystic.math.paramtrans import graphical_distance 264 264 Ry = graphical_distance(model, c, ytol=Cy, xtol=Cx, cutoff=0.0, imax=0) 265 265 print "vertical_distance: %s <= %s" % (Ry, Cy + max(Cx)) -
branches/UQ/math/legacy/TEST_OUQ_StAlData.py
r558 r569 21 21 # the dataset 22 22 ####################################################################### 23 from legacydata import load_dataset23 from mystic.math.legacydata import load_dataset 24 24 data = load_dataset('StAlDataset.txt') 25 25 … … 71 71 def maximize(params,npts,bounds): 72 72 73 from dirac_measure import scenario73 from mystic.math.dirac_measure import scenario 74 74 from numpy import inf 75 75 target,error = params … … 100 100 ##################### begin function-specific ##################### 101 101 # impose mean on the values of the product measure 102 from dirac_measure import mean_y_norm_wts_constraintsFactory as factory102 from mystic.math.dirac_measure import mean_y_norm_wts_constraintsFactory as factory 103 103 constrain = factory((target[0],error[0]), npts) 104 104 … … 184 184 nz = 2 #NOTE: SET THE NUMBER OF 'v' POINTS HERE! 185 185 npts = (nx,ny,nz) 186 from paramtrans import _npts186 from mystic.math.paramtrans import _npts 187 187 _n = _npts(npts) 188 188 … … 247 247 248 248 from numpy import array 249 from dirac_measure import scenario249 from mystic.math.dirac_measure import scenario 250 250 c = scenario() 251 251 c.load(solved,npts) -
branches/UQ/math/legacy/TEST_OUQ_StStSurr_Cy.py
r557 r569 70 70 def maximize(params,npts,bounds): 71 71 72 from dirac_measure import scenario72 from mystic.math.dirac_measure import scenario 73 73 from numpy import inf 74 74 target,error = params … … 99 99 ##################### begin function-specific ##################### 100 100 # impose mean on the values of the product measure 101 from dirac_measure import mean_y_norm_wts_constraintsFactory as factory101 from mystic.math.dirac_measure import mean_y_norm_wts_constraintsFactory as factory 102 102 constrain = factory((target[0],error[0]), npts) 103 103 … … 185 185 nz = 1 #NOTE: SET THE NUMBER OF 'v' POINTS HERE! 186 186 npts = (nx,ny,nz) 187 from paramtrans import _npts187 from mystic.math.paramtrans import _npts 188 188 _n = _npts(npts) 189 189 … … 247 247 248 248 from numpy import array 249 from dirac_measure import scenario249 from mystic.math.dirac_measure import scenario 250 250 c = scenario() 251 251 c.load(solved,npts) … … 261 261 print "sum_wts: %s == 1.0" % [sum(w) for w in c.wts] 262 262 263 from paramtrans import graphical_distance263 from mystic.math.paramtrans import graphical_distance 264 264 Ry = graphical_distance(model, c, ytol=Cy, xtol=Cx, cutoff=0.0, imax=0) 265 265 print "vertical_distance: %s <= %s" % (Ry, Cy + max(Cx)) -
branches/UQ/math/legacy/test_ExampleDataset.py
r557 r569 7 7 Mathematical Modeling and Numerical Analysis (submitted 2012). 8 8 """ 9 from legacydata import load_dataset9 from mystic.math.legacydata import load_dataset 10 10 datafile = 'ExampleDataset.txt' 11 11 … … 31 31 32 32 # Check shortness 33 from paramtrans import lipschitz_distance, graphical_distance33 from mystic.math.paramtrans import lipschitz_distance, graphical_distance 34 34 print("\nshort: %s" % ex1d_data.short()) 35 35 L = ex1d_data.lipschitz; -
branches/UQ/math/legacy/test_ModeledDataset.py
r557 r569 11 11 12 12 # Build a initial dataset 13 from legacydata import datapoint, dataset13 from mystic.math.legacydata import datapoint, dataset 14 14 x = [[0,0,0],[1,1,1],[2,2,2],[3,3,3]] 15 15 y = [0,2,4,9] -
branches/UQ/math/legacy/test_StAlDataset.py
r557 r569 7 7 Mathematical Modeling and Numerical Analysis (submitted 2012). 8 8 """ 9 from legacydata import load_dataset9 from mystic.math.legacydata import load_dataset 10 10 datafile = 'StAlDataset.txt' 11 11 st_al_data = load_dataset(datafile) … … 21 21 22 22 # Check shortness 23 from paramtrans import lipschitz_distance, graphical_distance23 from mystic.math.paramtrans import lipschitz_distance, graphical_distance 24 24 print("\nshort: %s" % st_al_data.short()) 25 25 L = st_al_data.lipschitz; -
branches/UQ/math/sausage/TEST_OUQ_1dSurr_diam.py
r553 r569 22 22 # the model function and the dataset 23 23 ####################################################################### 24 #from StAlSurrogate import st_al_surr as model25 #from legacydata import load_dataset26 #data = load_dataset('ExampleDataset.txt', range(0,1))27 #L = data.lipschitz28 29 24 def model(x): 30 25 return x[0]; 26 31 27 32 28 ####################################################################### … … 76 72 def maximize(params,npts,bounds): 77 73 78 from dirac_measure import scenario74 from mystic.math.dirac_measure import scenario 79 75 from mystic.math import almostEqual 80 76 from numpy import inf … … 189 185 nz = 1 #NOTE: SET THE NUMBER OF 'v' POINTS HERE! 190 186 npts = (nx,ny,nz) 191 from paramtrans import _npts187 from mystic.math.paramtrans import _npts 192 188 _n = _npts(npts) 193 189 … … 252 248 253 249 from numpy import array 254 from dirac_measure import scenario250 from mystic.math.dirac_measure import scenario 255 251 c = scenario() 256 252 c.load(solved,npts) -
branches/UQ/math/sausage/TEST_OUQ_StStSurr.py
r555 r569 23 23 ####################################################################### 24 24 from StStSurrogate import marc_surr as model 25 #from legacydata import load_dataset26 #data = load_dataset('ExampleDataset.txt', range(0,1))27 #L = data.lipschitz28 25 29 26 … … 74 71 def maximize(params,npts,bounds): 75 72 76 from dirac_measure import scenario73 from mystic.math.dirac_measure import scenario 77 74 from mystic.math import almostEqual 78 75 from numpy import inf … … 200 197 nz = 1 #NOTE: SET THE NUMBER OF 'v' POINTS HERE! 201 198 npts = (nx,ny,nz) 202 from paramtrans import _npts199 from mystic.math.paramtrans import _npts 203 200 _n = _npts(npts) 204 201 … … 263 260 264 261 from numpy import array 265 from dirac_measure import scenario262 from mystic.math.dirac_measure import scenario 266 263 c = scenario() 267 264 c.load(solved,npts)
Note: See TracChangeset
for help on using the changeset viewer.