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/TEST4d_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 
     
    114114    # impose expectation on product measure 
    115115    ##################### begin function-specific ##################### 
    116     E = float(c.get_expect(model)) 
     116    E = float(c.expect(model)) 
    117117    if not (E <= float(target[0] + error[0])) \ 
    118118    or not (float(target[0] - error[0]) <= E): 
     
    130130    #XXX: apply 'filters' to catch errors in constraints solver (necessary ?) 
    131131    ##################### begin function-specific ##################### 
    132     E = float(c.get_expect(model)) 
     132    E = float(c.expect(model)) 
    133133    if E > (target[0] + error[0]) or E < (target[0] - error[0]): 
    134134      if debug: print "skipping expect: %s" % E 
     
    238238 
    239239  from numpy import array 
    240   from mystic.math.dirac_measure import product_measure 
     240  from mystic.math.discrete import product_measure 
    241241  c = product_measure() 
    242242  c.load(solved,npts) 
     
    246246  
    247247  # XXX: 4D-expect 
    248   print "expect: %s" % str( c.get_expect(model) ) 
     248  print "expect: %s" % str( c.expect(model) ) 
    249249  print "var (x): %s" % str( c[0].var )   # var(h) 
    250250  print "mean(x): %s" % str( c[0].mean )  # mean(h) 
Note: See TracChangeset for help on using the changeset viewer.