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/collapse/TEST_OUQ_surrogate_diam_collapse.py

    r576 r687  
    5858 
    5959  from mystic.math.measures import split_param 
    60   from mystic.math.dirac_measure import product_measure 
     60  from mystic.math.discrete import product_measure 
    6161  from mystic.math import almostEqual 
    6262  from numpy import inf 
     
    8484    # impose expectation on product measure 
    8585    ##################### begin function-specific ##################### 
    86     E = float(c.get_expect(model)) 
     86    E = float(c.expect(model)) 
    8787    if not (E <= float(target[0] + error[0])) \ 
    8888    or not (float(target[0] - error[0]) <= E): 
     
    9696    c = product_measure() 
    9797    c.load(rv, npts) 
    98     E = float(c.get_expect(model)) 
     98    E = float(c.expect(model)) 
    9999    if E > (target[0] + error[0]) or E < (target[0] - error[0]): 
    100100      if debug: print "skipping expect: %s" % E 
     
    188188 
    189189  from numpy import array 
    190   from mystic.math.dirac_measure import product_measure 
     190  from mystic.math.discrete import product_measure 
    191191  c = product_measure() 
    192192  c.load(solved,npts) 
     
    195195  print "solved: [wz,z]\n%s" % array(zip(c[2].weights,c[2].coords)) 
    196196 
    197   print "expect: %s" % str( c.get_expect(model) ) 
     197  print "expect: %s" % str( c.expect(model) ) 
    198198   
    199199  elapsed = (clock() - start) 
Note: See TracChangeset for help on using the changeset viewer.