Timeline for Selecting N samples uniformly from a grid points
Current License: CC BY-SA 4.0
18 events
when toggle format | what | by | license | comment | |
---|---|---|---|---|---|
May 22, 2023 at 20:00 | history | bumped | CommunityBot | This question has answers that may be good or bad; the system has marked it active so that they can be reviewed. | |
Jan 20, 2023 at 8:00 | history | bumped | CommunityBot | This question has answers that may be good or bad; the system has marked it active so that they can be reviewed. | |
Sep 22, 2022 at 4:06 | history | bumped | CommunityBot | This question has answers that may be good or bad; the system has marked it active so that they can be reviewed. | |
Jul 27, 2022 at 12:05 | comment | added | Vince | Systematic sampling and random sampling are different techniques. Then there's systematic random sampling. From your description of the goal, you just need to cluster your "grid" cells in fours and choose the upper-left subcell (every other, skipping rows). | |
Jul 27, 2022 at 11:53 | history | edited | TK7372 | CC BY-SA 4.0 |
added 3 characters in body
|
Jul 27, 2022 at 11:38 | history | edited | TK7372 | CC BY-SA 4.0 |
added 204 characters in body
|
Jul 27, 2022 at 10:15 | answer | added | Kalak | timeline score: 1 | |
Jul 27, 2022 at 9:51 | comment | added | Kalak |
Then you should try something along these lines : 1. create a list with the first point of the data frame, 2. than while iterating over the rest of the dataframe only add the current point to the list if it is not within x meters from any of the points in the list with something like scipy.spatial.distance.cityblock() or scipy.spatial.distance.euclidean()
|
|
Jul 27, 2022 at 9:22 | history | edited | TK7372 | CC BY-SA 4.0 |
deleted 4 characters in body
|
Jul 27, 2022 at 9:22 | history | edited | TK7372 | CC BY-SA 4.0 |
added 150 characters in body
|
Jul 27, 2022 at 9:21 | comment | added | TK7372 | Yes that would not work well. Also it is not necessary that it should select every other point, I have given just representation. I just want to select points such that deviation of distance between selected points is minimum. | |
Jul 27, 2022 at 9:15 | comment | added | Kalak |
couldn't you sort your dataframe by (y axis, x axis) and then itererate over your sorted dataframe and extract every other feature with a counter for example and if counter % 2 == 0: ?? edit: I guess it wouldn't work really well if you have an odd number of columns or rows because there would be a shift every other row / column
|
|
Jul 27, 2022 at 8:41 | review | Close votes | |||
Jul 27, 2022 at 18:49 | |||||
Jul 27, 2022 at 8:35 | comment | added | TK7372 | @BERA if you see both images every other point is selected in second image (1 point skipped). But when I use df.sample(N) it selects N number of samples randomly no specific skip/distance between two points. I need to select points such that deviation of distance between two selected points is minimum. | |
Jul 27, 2022 at 8:28 | comment | added | Bera | Uniform how, can you circle some of the points as an example? | |
Jul 27, 2022 at 8:21 | history | edited | TK7372 | CC BY-SA 4.0 |
added 69 characters in body
|
S Jul 27, 2022 at 8:18 | review | First questions | |||
Jul 27, 2022 at 8:22 | |||||
S Jul 27, 2022 at 8:18 | history | asked | TK7372 | CC BY-SA 4.0 |