Changeset 687 for branches/collapse/TEST_OUQ_surrogate_diam_collapse.py
- Timestamp:
- 06/15/13 18:43:09 (3 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/collapse/TEST_OUQ_surrogate_diam_collapse.py
r576 r687 58 58 59 59 from mystic.math.measures import split_param 60 from mystic.math.di rac_measure import product_measure60 from mystic.math.discrete import product_measure 61 61 from mystic.math import almostEqual 62 62 from numpy import inf … … 84 84 # impose expectation on product measure 85 85 ##################### begin function-specific ##################### 86 E = float(c. get_expect(model))86 E = float(c.expect(model)) 87 87 if not (E <= float(target[0] + error[0])) \ 88 88 or not (float(target[0] - error[0]) <= E): … … 96 96 c = product_measure() 97 97 c.load(rv, npts) 98 E = float(c. get_expect(model))98 E = float(c.expect(model)) 99 99 if E > (target[0] + error[0]) or E < (target[0] - error[0]): 100 100 if debug: print "skipping expect: %s" % E … … 188 188 189 189 from numpy import array 190 from mystic.math.di rac_measure import product_measure190 from mystic.math.discrete import product_measure 191 191 c = product_measure() 192 192 c.load(solved,npts) … … 195 195 print "solved: [wz,z]\n%s" % array(zip(c[2].weights,c[2].coords)) 196 196 197 print "expect: %s" % str( c. get_expect(model) )197 print "expect: %s" % str( c.expect(model) ) 198 198 199 199 elapsed = (clock() - start)
Note: See TracChangeset
for help on using the changeset viewer.