Communities

Writing
Writing
Codidact Meta
Codidact Meta
The Great Outdoors
The Great Outdoors
Photography & Video
Photography & Video
Scientific Speculation
Scientific Speculation
Cooking
Cooking
Electrical Engineering
Electrical Engineering
Judaism
Judaism
Languages & Linguistics
Languages & Linguistics
Software Development
Software Development
Mathematics
Mathematics
Christianity
Christianity
Code Golf
Code Golf
Music
Music
Physics
Physics
Linux Systems
Linux Systems
Power Users
Power Users
Tabletop RPGs
Tabletop RPGs
Community Proposals
Community Proposals
tag:snake search within a tag
answers:0 unanswered questions
user:xxxx search by author id
score:0.5 posts with 0.5+ score
"snake oil" exact phrase
votes:4 posts with 4+ votes
created:<1w created < 1 week ago
post_type:xxxx type of post
Search help
Notifications
Mark all as read See all your notifications »
Q&A

Comments on How do I (efficiently) sample from the interior of a convex polytope?

Post

How do I (efficiently) sample from the interior of a convex polytope?

+4
−0

I wish to sample a "typical" point in the interior of a convex polytope. The volume is defined by vectors $\vec{G}_k$ and values $v_k$ such that $\forall k,(\vec{X} \cdot \vec{G}_k) > v_k$. However, I also have an additional point $\vec{X}_j$ which is guaranteed to be on the boundary of the convex polytope normal to the vector $\vec{G}_j$ .

I currently have a few ideas:

I could use the Metropolis-Hastings algorithm, which would start with $\vec{X}_j$ and perturb it with a normal distribution, accepting the new point if it stays in the interior of the convex shape, until it "looks right"? But I don't know how many samples I would need to process until that occurs, nor the hyperparameters to use?

I could also try perturbing $\vec{X}_j$ in the direction of $\vec{G}_j$, which would push the point away from the boundary of the shape?

(This is also in a very high dimensional space, of about 100,000 - but the exact number isn't too important)

History
Why does this post require attention from curators or moderators?
You might want to add some details to your flag.
Why should this post be closed?

3 comment threads

My guess would be that the most efficient way to sample would be to random sample from a well-chosen ... (3 comments)
Terminology and dimensions (2 comments)
Possible ambiguity (2 comments)
Terminology and dimensions
Peter Taylor‭ wrote 21 days ago

Two independent points: 1. "Convex hull" suggests an underlying set which you're bounding. The description of your data would fit better with the term "convex polytope", which may help you search the literature. 2. "the edge... normal to the vector $\vec{G}_j$" suggests that you're working in 2D. If you have a fixed dimension then it would be useful to state this, because some approaches may be more efficient in low vs high dimension settings. In 2D it would seem to me that it's going to be reasonably efficient to just triangulate the polygon, select a triangle uniformly weighted by its area, and then select a point within that triangle.

purplenanite‭ wrote 19 days ago

I think this is a case of me not knowing the correct terminology. It is in a very high-dimensional space, i should have said something like "the (boundary/hypersurface)... normal to the vector $\vec{G}_k$"

I'll change the question to better reflect this.