Ignore:
Timestamp:
06/15/13 18:43:09 (3 years ago)
Author:
mmckerns
Message:

renaming of some of the measure methods, including dirac_measure to measure
moved dirac_measure.py to discrete.py, and paramtrans to distance
added isinstance to tools; added min, max, ess_min, ess_max to measures
moved dirac_measure.coords to dirac_measure.positions

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/UQ/math/examples2/TEST_OUQ_surrogate_diam.py

    r575 r687  
    6868 
    6969  from mystic.math.measures import split_param 
    70   from mystic.math.dirac_measure import product_measure 
     70  from mystic.math.discrete import product_measure 
    7171  from mystic.math import almostEqual 
    7272  from numpy import inf 
     
    9494    # impose expectation on product measure 
    9595    ##################### begin function-specific ##################### 
    96     E = float(c.get_expect(model)) 
     96    E = float(c.expect(model)) 
    9797    if not (E <= float(target[0] + error[0])) \ 
    9898    or not (float(target[0] - error[0]) <= E): 
     
    106106    c = product_measure() 
    107107    c.load(rv, npts) 
    108     E = float(c.get_expect(model)) 
     108    E = float(c.expect(model)) 
    109109    if E > (target[0] + error[0]) or E < (target[0] - error[0]): 
    110110      if debug: print "skipping expect: %s" % E 
     
    190190 
    191191  from numpy import array 
    192   from mystic.math.dirac_measure import product_measure 
     192  from mystic.math.discrete import product_measure 
    193193  c = product_measure() 
    194194  c.load(solved,npts) 
     
    197197  print "solved: [wz,z]\n%s" % array(zip(c[2].weights,c[2].coords)) 
    198198 
    199   print "expect: %s" % str( c.get_expect(model) ) 
     199  print "expect: %s" % str( c.expect(model) ) 
    200200 
    201201# EOF 
Note: See TracChangeset for help on using the changeset viewer.