You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When computing a probability with a system event, the sensitivity analysis is really difficult to apply because the history sample seems not to be propagated inside the result object.
Two constructors on the 3 given are not working at all.
How to reproduce the issue?
import openturns as ot
dim = 2
X = ot.RandomVector(ot.Normal(dim))
f1 = ot.MemoizeFunction(ot.SymbolicFunction(['x1', 'x2'], ['x1']))
f2 = ot.MemoizeFunction(ot.SymbolicFunction(['x1', 'x2'], ['x2']))
Y1 = ot.CompositeRandomVector(f1, X)
Y2 = ot.CompositeRandomVector(f2, X)
e1 = ot.ThresholdEvent(Y1, ot.Less(), 0.0)
e2 = ot.ThresholdEvent(Y2, ot.Greater(), 0.0)
event = ot.UnionEvent([e1, e2])
algo = ot.ProbabilitySimulationAlgorithm(event)
algo.setMaximumOuterSampling(150)
algo.setBlockSize(4)
algo.setMaximumCoefficientOfVariation(0.1)
algo.run()
result = algo.getResult()
# First constructor# get the history from the result event is not possible
f_event = ot.MemoizeFunction(result.getEvent().getImplementation().asComposedEvent().getFunction())
print(f_event.getCacheInput().getSize()) # --> size = 0# the event output should be the one of the composite function# --> it is complicated to get the history, I must recompute it using the event
input_sample = f1.getInputHistory()
output_sample = event.asComposedEvent().getFunction()(input_sample)
ssa = ot.SimulationSensitivityAnalysis(event.asComposedEvent(), input_sample, output_sample)
# second constructor not working : empty samples and maybe not ideal# to use the getImplementation anyway
ssa = ot.SimulationSensitivityAnalysis(result.getEvent().getImplementation().asComposedEvent())
# third constructor not working
ssa = ot.SimulationSensitivityAnalysis(result)
Version
1.22
Operating System
Linux
Installation media
conda
Additional Context
No response
The text was updated successfully, but these errors were encountered:
What happened?
When computing a probability with a system event, the sensitivity analysis is really difficult to apply because the history sample seems not to be propagated inside the result object.
Two constructors on the 3 given are not working at all.
How to reproduce the issue?
Version
1.22
Operating System
Linux
Installation media
conda
Additional Context
No response
The text was updated successfully, but these errors were encountered: