Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

UniformOverMesh iso-probabilistic transformation issue #2625

Open
jschueller opened this issue Apr 25, 2024 · 1 comment
Open

UniformOverMesh iso-probabilistic transformation issue #2625

jschueller opened this issue Apr 25, 2024 · 1 comment
Labels

Comments

@jschueller
Copy link
Member

jschueller commented Apr 25, 2024

What happened?

A colleague tried combining UniformOverMesh with LHS, and that should probably not be allowed;
in practice yield points outside of the mesh (from levelset x+y<171):
I doubt we can map the standard space into a mesh yet, even when the mesh is convex
maybe getStandardDistribution should return something else, if that exists :)
what do you think @regislebrun ?
unimesh_lhs

How to reproduce the issue?

import openturns as ot
import openturns.viewer as otv

ot.Log.Show(ot.Log.INFO)
f = ot.SymbolicFunction(['x', 'y'], ['x+y'])
levelSet = ot.LevelSet(f, ot.Less(), 171)
box=ot.Interval([10, 20], [151, 161])
mesh = ot.LevelSetMesher([10]*2).build(levelSet, box, False)
mesh.draw()
distribution = ot.UniformOverMesh(mesh)
sample_mc=distribution.getSample(30)
lhs = ot.LHSExperiment(distribution, 30)
sample_lhs = lhs.generate()
graph_h = distribution.drawPDF()
cloud_h = ot.Cloud(sample_mc, 'MCs')
cloud_lhs = ot.Cloud(sample_lhs, 'lhs')
graph_h.add(cloud_h)
graph_h.add(cloud_lhs)
otv.View(graph_h).save("/tmp/unimesh_lhs.png")

Additional Context

the use-case was to generate a DOE that has low discrepancy properties, but on a weird mesh domain
I advised to generate a larger Sobol/LHS sample inside the mesh box bounds then prune points outside the mesh

@jschueller jschueller added the bug label Apr 25, 2024
@regislebrun
Copy link
Member

regislebrun commented Apr 27, 2024

@jschueller The main problem is the computation of CDF and marginal distributions, mandatory an accurate and efficient Rosenblatt transformation. Unfortunately the two are currently missing 😞

Note that with the new version of MarginalDistribution, it looks like we are progressing. Your script gives:

Figure_1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants