Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8093319
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 5, 20262026-06-05T20:28:47+00:00 2026-06-05T20:28:47+00:00

how do I select a subset of points at a regular density? More formally,

  • 0

how do I select a subset of points at a regular density? More formally,

Given

  1. a set A of irregularly spaced points,
  2. a metric of distance dist (e.g., Euclidean distance),
  3. and a target density d,

how can I select a smallest subset B that satisfies below?

  • for every point x in A,
  • there exists a point y in B
  • which satisfies dist(x,y) <= d

My current best shot is to

  • start with A itself
  • pick out the closest (or just particularly close) couple of points
  • randomly exclude one of them
  • repeat as long as the condition holds

and repeat the whole procedure for best luck. But are there better ways?

I’m trying to do this with 280,000 18-D points, but my question is in general strategy. So I also wish to know how to do it with 2-D points. And I don’t really need a guarantee of a smallest subset. Any useful method is welcome. Thank you.


bottom-up method

  • select a random point
  • select among unselected y for which min(d(x,y) for x in selected) is largest
  • keep going!

I’ll call it bottom-up and the one I originally posted top-down. This is much faster in the beginning, so for sparse sampling this should be better?

performance measure

If guarantee of optimality is not required, I think these two indicators could be useful:

  • radius of coverage: max {y in unselected} min(d(x,y) for x in selected)
  • radius of economy: min {y in selected != x} min(d(x,y) for x in selected)

RC is minimum allowed d, and there is no absolute inequality between these two. But RC <= RE is more desirable.

my little methods

For a little demonstration of that “performance measure,” I generated 256 2-D points distributed uniformly or by standard normal distribution. Then I tried my top-down and bottom-up methods with them. And this is what I got:

bottom-up.norm
top-down.norm

RC is red, RE is blue. X axis is number of selected points. Did you think bottom-up could be as good? I thought so watching the animation, but it seems top-down is significantly better (look at the sparse region). Nevertheless, not too horrible given that it’s much faster.

Here I packed everything.

http://www.filehosting.org/file/details/352267/density_sampling.tar.gz

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-05T20:28:48+00:00Added an answer on June 5, 2026 at 8:28 pm

    A genetic algorithm may probably produce good results here.

    update:

    I have been playing a little with this problem and these are my findings:

    A simple method (call it random-selection) to obtain a set of points fulfilling the stated condition is as follows:

    1. start with B empty
    2. select a random point x from A and place it in B
    3. remove from A every point y such that dist(x, y) < d
    4. while A is not empty go to 2

    A kd-tree can be used to perform the look ups in step 3 relatively fast.

    The experiments I have run in 2D show that the subsets generated are approximately half the size of the ones generated by your top-down approach.

    Then I have used this random-selection algorithm to seed a genetic algorithm that resulted in a further 25% reduction on the size of the subsets.

    For mutation, giving a chromosome representing a subset B, I randomly choose an hyperball inside the minimal axis-aligned hyperbox that covers all the points in A. Then, I remove from B all the points that are also in the hyperball and use the random-selection to complete it again.

    For crossover I employ a similar approach, using a random hyperball to divide the mother and father chromosomes.

    I have implemented everything in Perl using my wrapper for the GAUL library (GAUL can be obtained from here.

    The script is here: https://github.com/salva/p5-AI-GAUL/blob/master/examples/point_density.pl

    It accepts a list of n-dimensional points from stdin and generates a collection of pictures showing the best solution for every iteration of the genetic algorithm. The companion script https://github.com/salva/p5-AI-GAUL/blob/master/examples/point_gen.pl can be used to generate the random points with a uniform distribution.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Is there any way to select a subset from a large set based on
I would like to select a subset of elements from a whole that satisfy
Possible Duplicate: How do I randomly select k points from N points in MATLAB?
Is there a way to select a subset from objects (data frames, matrices, vectors)
I need to programatically select a subset of ListBoxItems in a ListBox ( SelectedMode=Multiple
I'm trying to select a subset of features from a data that contains 2000
var subset = from item in document.Descendants(Id) where item.Value == itemId.ToString() select new PurchaseItem()
Possible Duplicate: randperm subset of random m-by-n matrix When trying to randomly select 1000
I am building a gui which lets me select a subset of a data.frame
I have a datagridview where the users can select which subset of columns to

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.