Skip to main content
12 events
when toggle format what by license comment
Jul 8, 2022 at 13:41 comment added whuber @Jakub You are correct on all points.
Jul 7, 2022 at 22:12 comment added Jakub The point I was trying to make was that I would need a rotation matrix (which I thought was linear) to calculate the Manhattan distances on a rotated grid, but I do not know the angle. I can calculate Euclidean distances because they are rotation invariant. Am I wrong on that? I can see where my 30 seconds of jumble thoughts, while my mind was on something else, were confusing. Sorry for the confusion. My bad.
Jul 7, 2022 at 20:19 comment added whuber @Jackub Manhattan distance is a "simple linear transformation" of what? Certainly not of Euclidean distance! It's a little strange that you write of not being able to compute distances that might be relevant. Regardless, if your problem is similar to the one posed here--namely, trying to recover coordinates of points for which you only have a noisy distance matrix--then look into MDS and other low-dimension embedding procedures.
Jul 7, 2022 at 20:08 comment added Jakub Thanks for giving this some thought. I'm not seeing how using Manhattan distances can help, since it's a simple linear transformation. It seems the problem comes down to the best segmentation method. I'm not sure that Manhattan distances can be used for doubling back. An example would be houses on the same block. The nearest neighbor could be two houses with adjoining backyards. If I don't know what streets the houses are on, I can't calculate the the Manhattan distance, especially if the grid is rotated at an unknown angle (< 10° from my purpose).
Jul 7, 2022 at 12:19 comment added whuber @Jakub If you are using the Manhattan distance (which is the travel distance on a street grid) this approach continues to give a linear model for the parameters. Otherwise it gives a nonlinear model that is (much) harder to fit and analyze.
Jul 7, 2022 at 0:13 comment added Jakub After re-reading the OP, I realized this is for points on a single line. My points are on a grid like homes on a street grid. I can't see anyway this would work for my purpose.
Jul 5, 2022 at 18:35 comment added Jakub Thanks. My demon is OpenCV, so I'm starting with noisy coordinates from contour and edge detection. There should be no reason why the errors would be serially correlated. Currently, I'm segmenting the points by what gridline they belong using k-NN. I then use a parallel slopes OLS model on the original coordinates combined with the same coordinates, but rotated 90°. It sounds like converting the data pts to distances would be much better than attempting to segment the data which occasionally fails. I stopped using R 5 yrs ago, so I'll have to convert it to Python, and that's why I asked first.
Jul 5, 2022 at 13:30 comment added whuber @Jakub I believe it will work then, assuming there is no strong association between the missing distances and the errors. (For instance, if some demon started with a full dataset and systematically removed all distances related to point pairs approximately oriented north-south, conceivably the location estimates would be biased.) Nothing in the procedure needs to change: missing distances merely correspond to deleting some rows of the model matrix. But you can probably do even better by accounting explicitly for the varying angles, distances etc. of the images.
Jul 5, 2022 at 7:10 comment added Jakub Could this work in the case of having missing distances due to missing points if the noisy points/distances are roughly on a grid? You could think of it as noisy data from OpenCV of aerial images of houses and empty lots on city blocks. Roughly 25% of the lots are empty (no coordinates). The aerial images are from various angles. I want the coordinates of the empty lots, plus coordinates of the homes that fit a gridline. Any suggestions would be appreciated.
Aug 25, 2020 at 21:20 history edited whuber CC BY-SA 4.0
added 33 characters in body
Aug 25, 2020 at 20:41 vote accept Mike Lawrence
Aug 25, 2020 at 20:39 history answered whuber CC BY-SA 4.0