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)
My guess would be that the most efficient way to sample would be to random sample from a well-chosen ...
celtschk‭ wrote 20 days ago

My guess would be that the most efficient way to sample would be to random sample from a well-chosen parallelogram-shaped bounding box, and then discard the point and repeat if the point lies outside of the shape. While you have the additional effort of generating more points than you ultimately end up with, my guess would be that the complexity of ensuring to only generate points inside the shape and yet stay uniform is higher than the extra effort from generating those points you then throw away. Of course in the end, the only way to say for sure is to measure.

purplenanite‭ wrote 19 days ago

I think i have the wrong impression with my question - my data is very high dimensional, so i'm not certain reject sampling would work very well? And i'm not sure how to generate a bounding box using vectors $\vec{G}_j$ and values $v_j$?

celtschk‭ wrote 19 days ago

That is indeed a very important information. With thousands of dimensions, reject sampling probably would not be a good strategy. Another important question is the number of vectors. there are of course at least (dimension+1) of them (or else you'd not have a finite volume), but it should make a huge difference if the number of vectors is only slightly above the number of dimensions, or much larger.