Changeset 569 for branches


Ignore:
Timestamp:
09/24/12 15:59:25 (4 years ago)
Author:
mmckerns
Message:

merge of dirac_measure plus compressed, paramtrans, and legacydata to _math

Location:
branches/UQ/math
Files:
14 deleted
12 edited

Legend:

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

    r556 r569  
    1717# the dataset 
    1818####################################################################### 
    19 from legacydata import load_dataset 
     19from mystic.math.legacydata import load_dataset 
    2020data = load_dataset('StAlDataset.txt') 
    2121 
     
    6767def maximize(params,npts,bounds): 
    6868 
    69   from dirac_measure import scenario 
     69  from mystic.math.dirac_measure import scenario 
    7070  from numpy import inf 
    7171  target,error = params 
     
    9696    ##################### begin function-specific ##################### 
    9797    # impose norm on the weights of the discrete measures 
    98     from dirac_measure import norm_wts_constraintsFactory as factory 
     98    from mystic.math.dirac_measure import norm_wts_constraintsFactory as factory 
    9999    constrain = factory(npts) 
    100100 
     
    158158  nz = 1  #NOTE: SET THE NUMBER OF 'v' POINTS HERE! 
    159159  npts = (nx,ny,nz) 
    160   from paramtrans import _npts 
     160  from mystic.math.paramtrans import _npts 
    161161  _n = _npts(npts) 
    162162 
     
    219219 
    220220  from numpy import array 
    221   from dirac_measure import scenario 
     221  from mystic.math.dirac_measure import scenario 
    222222  c = scenario() 
    223223  c.load(solved,npts) 
  • branches/UQ/math/legacy/MM_OUQ_StAlData.py

    r556 r569  
    2323# the dataset 
    2424####################################################################### 
    25 from legacydata import load_dataset 
     25from mystic.math.legacydata import load_dataset 
    2626data = load_dataset('StAlDataset.txt') 
    2727 
     
    7575def maximize(params,npts,bounds): 
    7676 
    77   from dirac_measure import scenario 
     77  from mystic.math.dirac_measure import scenario 
    7878  from numpy import inf 
    7979  target,error = params 
     
    104104    ##################### begin function-specific ##################### 
    105105    # impose mean on the values of the product measure 
    106     from dirac_measure import mean_y_norm_wts_constraintsFactory as factory 
     106    from mystic.math.dirac_measure import mean_y_norm_wts_constraintsFactory as factory 
    107107    constrain = factory((target[0],error[0]), npts) 
    108108 
     
    187187  nz = 2  #NOTE: SET THE NUMBER OF 'v' POINTS HERE! 
    188188  npts = (nx,ny,nz) 
    189   from paramtrans import _npts 
     189  from mystic.math.paramtrans import _npts 
    190190  _n = _npts(npts) 
    191191 
     
    250250 
    251251  from numpy import array 
    252   from dirac_measure import scenario 
     252  from mystic.math.dirac_measure import scenario 
    253253  c = scenario() 
    254254  c.load(solved,npts) 
  • branches/UQ/math/legacy/TEST_OUQ_1dData.py

    r556 r569  
    2121# the dataset 
    2222####################################################################### 
    23 from legacydata import load_dataset 
     23from mystic.math.legacydata import load_dataset 
    2424data = load_dataset('ExampleDataset.txt', range(0,1)) 
    2525 
     
    7171def maximize(params,npts,bounds): 
    7272 
    73   from dirac_measure import scenario 
     73  from mystic.math.dirac_measure import scenario 
    7474  from numpy import inf 
    7575  target,error = params 
     
    100100    ##################### begin function-specific ##################### 
    101101    # impose mean on the values of the product measure 
    102     from dirac_measure import mean_y_norm_wts_constraintsFactory as factory 
     102    from mystic.math.dirac_measure import mean_y_norm_wts_constraintsFactory as factory 
    103103    constrain = factory((target[0],error[0]), npts) 
    104104 
     
    183183  nz = 1  #NOTE: SET THE NUMBER OF 'v' POINTS HERE! 
    184184  npts = (nx,ny,nz) 
    185   from paramtrans import _npts 
     185  from mystic.math.paramtrans import _npts 
    186186  _n = _npts(npts) 
    187187 
     
    246246 
    247247  from numpy import array 
    248   from dirac_measure import scenario 
     248  from mystic.math.dirac_measure import scenario 
    249249  c = scenario() 
    250250  c.load(solved,npts) 
  • branches/UQ/math/legacy/TEST_OUQ_1dSurr_CxCy.py

    r557 r569  
    7070def maximize(params,npts,bounds): 
    7171 
    72   from dirac_measure import scenario 
     72  from mystic.math.dirac_measure import scenario 
    7373  from numpy import inf 
    7474  target,error = params 
     
    9999    ##################### begin function-specific ##################### 
    100100    # impose mean on the values of the product measure 
    101     from dirac_measure import mean_y_norm_wts_constraintsFactory as factory 
     101    from mystic.math.dirac_measure import mean_y_norm_wts_constraintsFactory as factory 
    102102    constrain = factory((target[0],error[0]), npts) 
    103103 
     
    185185  nz = 1  #NOTE: SET THE NUMBER OF 'v' POINTS HERE! 
    186186  npts = (nx,ny,nz) 
    187   from paramtrans import _npts 
     187  from mystic.math.paramtrans import _npts 
    188188  _n = _npts(npts) 
    189189 
     
    247247 
    248248  from numpy import array 
    249   from dirac_measure import scenario 
     249  from mystic.math.dirac_measure import scenario 
    250250  c = scenario() 
    251251  c.load(solved,npts) 
     
    261261  print "sum_wts: %s == 1.0" % [sum(w) for w in c.wts] 
    262262 
    263   from paramtrans import graphical_distance 
     263  from mystic.math.paramtrans import graphical_distance 
    264264  Ry = graphical_distance(model, c, ytol=Cy, xtol=Cx, cutoff=0.0, imax=0) 
    265265  print "vertical_distance: %s <= %s" % (Ry, Cy + max(Cx)) 
  • branches/UQ/math/legacy/TEST_OUQ_1dSurr_Cy.py

    r557 r569  
    7070def maximize(params,npts,bounds): 
    7171 
    72   from dirac_measure import scenario 
     72  from mystic.math.dirac_measure import scenario 
    7373  from numpy import inf 
    7474  target,error = params 
     
    9999    ##################### begin function-specific ##################### 
    100100    # impose mean on the values of the product measure 
    101     from dirac_measure import mean_y_norm_wts_constraintsFactory as factory 
     101    from mystic.math.dirac_measure import mean_y_norm_wts_constraintsFactory as factory 
    102102    constrain = factory((target[0],error[0]), npts) 
    103103 
     
    185185  nz = 1  #NOTE: SET THE NUMBER OF 'v' POINTS HERE! 
    186186  npts = (nx,ny,nz) 
    187   from paramtrans import _npts 
     187  from mystic.math.paramtrans import _npts 
    188188  _n = _npts(npts) 
    189189 
     
    247247 
    248248  from numpy import array 
    249   from dirac_measure import scenario 
     249  from mystic.math.dirac_measure import scenario 
    250250  c = scenario() 
    251251  c.load(solved,npts) 
     
    261261  print "sum_wts: %s == 1.0" % [sum(w) for w in c.wts] 
    262262 
    263   from paramtrans import graphical_distance 
     263  from mystic.math.paramtrans import graphical_distance 
    264264  Ry = graphical_distance(model, c, ytol=Cy, xtol=Cx, cutoff=0.0, imax=0) 
    265265  print "vertical_distance: %s <= %s" % (Ry, Cy + max(Cx)) 
  • branches/UQ/math/legacy/TEST_OUQ_StAlData.py

    r558 r569  
    2121# the dataset 
    2222####################################################################### 
    23 from legacydata import load_dataset 
     23from mystic.math.legacydata import load_dataset 
    2424data = load_dataset('StAlDataset.txt') 
    2525 
     
    7171def maximize(params,npts,bounds): 
    7272 
    73   from dirac_measure import scenario 
     73  from mystic.math.dirac_measure import scenario 
    7474  from numpy import inf 
    7575  target,error = params 
     
    100100    ##################### begin function-specific ##################### 
    101101    # impose mean on the values of the product measure 
    102     from dirac_measure import mean_y_norm_wts_constraintsFactory as factory 
     102    from mystic.math.dirac_measure import mean_y_norm_wts_constraintsFactory as factory 
    103103    constrain = factory((target[0],error[0]), npts) 
    104104 
     
    184184  nz = 2  #NOTE: SET THE NUMBER OF 'v' POINTS HERE! 
    185185  npts = (nx,ny,nz) 
    186   from paramtrans import _npts 
     186  from mystic.math.paramtrans import _npts 
    187187  _n = _npts(npts) 
    188188 
     
    247247 
    248248  from numpy import array 
    249   from dirac_measure import scenario 
     249  from mystic.math.dirac_measure import scenario 
    250250  c = scenario() 
    251251  c.load(solved,npts) 
  • branches/UQ/math/legacy/TEST_OUQ_StStSurr_Cy.py

    r557 r569  
    7070def maximize(params,npts,bounds): 
    7171 
    72   from dirac_measure import scenario 
     72  from mystic.math.dirac_measure import scenario 
    7373  from numpy import inf 
    7474  target,error = params 
     
    9999    ##################### begin function-specific ##################### 
    100100    # impose mean on the values of the product measure 
    101     from dirac_measure import mean_y_norm_wts_constraintsFactory as factory 
     101    from mystic.math.dirac_measure import mean_y_norm_wts_constraintsFactory as factory 
    102102    constrain = factory((target[0],error[0]), npts) 
    103103 
     
    185185  nz = 1  #NOTE: SET THE NUMBER OF 'v' POINTS HERE! 
    186186  npts = (nx,ny,nz) 
    187   from paramtrans import _npts 
     187  from mystic.math.paramtrans import _npts 
    188188  _n = _npts(npts) 
    189189 
     
    247247 
    248248  from numpy import array 
    249   from dirac_measure import scenario 
     249  from mystic.math.dirac_measure import scenario 
    250250  c = scenario() 
    251251  c.load(solved,npts) 
     
    261261  print "sum_wts: %s == 1.0" % [sum(w) for w in c.wts] 
    262262 
    263   from paramtrans import graphical_distance 
     263  from mystic.math.paramtrans import graphical_distance 
    264264  Ry = graphical_distance(model, c, ytol=Cy, xtol=Cx, cutoff=0.0, imax=0) 
    265265  print "vertical_distance: %s <= %s" % (Ry, Cy + max(Cx)) 
  • branches/UQ/math/legacy/test_ExampleDataset.py

    r557 r569  
    77Mathematical Modeling and Numerical Analysis (submitted 2012). 
    88""" 
    9 from legacydata import load_dataset 
     9from mystic.math.legacydata import load_dataset 
    1010datafile = 'ExampleDataset.txt' 
    1111 
     
    3131 
    3232  # Check shortness 
    33   from paramtrans import lipschitz_distance, graphical_distance 
     33  from mystic.math.paramtrans import lipschitz_distance, graphical_distance 
    3434  print("\nshort: %s" % ex1d_data.short()) 
    3535  L = ex1d_data.lipschitz; 
  • branches/UQ/math/legacy/test_ModeledDataset.py

    r557 r569  
    1111 
    1212  # Build a initial dataset 
    13   from legacydata import datapoint, dataset 
     13  from mystic.math.legacydata import datapoint, dataset 
    1414  x = [[0,0,0],[1,1,1],[2,2,2],[3,3,3]] 
    1515  y = [0,2,4,9] 
  • branches/UQ/math/legacy/test_StAlDataset.py

    r557 r569  
    77Mathematical Modeling and Numerical Analysis (submitted 2012). 
    88""" 
    9 from legacydata import load_dataset 
     9from mystic.math.legacydata import load_dataset 
    1010datafile = 'StAlDataset.txt' 
    1111st_al_data = load_dataset(datafile) 
     
    2121 
    2222  # Check shortness 
    23   from paramtrans import lipschitz_distance, graphical_distance 
     23  from mystic.math.paramtrans import lipschitz_distance, graphical_distance 
    2424  print("\nshort: %s" % st_al_data.short()) 
    2525  L = st_al_data.lipschitz; 
  • branches/UQ/math/sausage/TEST_OUQ_1dSurr_diam.py

    r553 r569  
    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  
    2924def model(x): 
    3025  return x[0]; 
     26 
    3127 
    3228####################################################################### 
     
    7672def maximize(params,npts,bounds): 
    7773 
    78   from dirac_measure import scenario 
     74  from mystic.math.dirac_measure import scenario 
    7975  from mystic.math import almostEqual 
    8076  from numpy import inf 
     
    189185  nz = 1  #NOTE: SET THE NUMBER OF 'v' POINTS HERE! 
    190186  npts = (nx,ny,nz) 
    191   from paramtrans import _npts 
     187  from mystic.math.paramtrans import _npts 
    192188  _n = _npts(npts) 
    193189 
     
    252248 
    253249  from numpy import array 
    254   from dirac_measure import scenario 
     250  from mystic.math.dirac_measure import scenario 
    255251  c = scenario() 
    256252  c.load(solved,npts) 
  • branches/UQ/math/sausage/TEST_OUQ_StStSurr.py

    r555 r569  
    2323####################################################################### 
    2424from StStSurrogate import marc_surr as model 
    25 #from legacydata import load_dataset 
    26 #data = load_dataset('ExampleDataset.txt', range(0,1)) 
    27 #L = data.lipschitz 
    2825 
    2926 
     
    7471def maximize(params,npts,bounds): 
    7572 
    76   from dirac_measure import scenario 
     73  from mystic.math.dirac_measure import scenario 
    7774  from mystic.math import almostEqual 
    7875  from numpy import inf 
     
    200197  nz = 1  #NOTE: SET THE NUMBER OF 'v' POINTS HERE! 
    201198  npts = (nx,ny,nz) 
    202   from paramtrans import _npts 
     199  from mystic.math.paramtrans import _npts 
    203200  _n = _npts(npts) 
    204201 
     
    263260 
    264261  from numpy import array 
    265   from dirac_measure import scenario 
     262  from mystic.math.dirac_measure import scenario 
    266263  c = scenario() 
    267264  c.load(solved,npts) 
Note: See TracChangeset for help on using the changeset viewer.