0

Suppose in the 2D space we have an array of points, and each point has a weighting factor, which is a float value ranging from 0 to 1. Each point also has a coordinate in the 2D grid. The following pseduo-codes show the property of the point:

class Point
{
 public:
    float weightingFactor_; // [0,1].
    float x_;
    float y_;

}

Now my question is: given an array of points, how can we select the best point pair? The criterion for best point pair is: (1) both points should have large weighting factors; (2) the two points should be as far as possible spatially based on the Euclidean distance. For the time being, my solution is for each point pair calculate the following criterion:

Point1.weightingFactor_*Point2.weightingFactor*Distance(Point1, Point2)

Among all the point pair, then select the pair whose criterion value is the largest. I am not sure whether this is the best solution. Any ideas? Thanks.

feelfree
  • 203
  • 3
  • 7
  • 1
    What relationship to statistics, data visualization, etc, does this question have? – russellpierce Aug 26 '14 at 15:19
  • 1
    Without knowing more about your problem it is hard to know how to select the best, or what really constitutes the best, point pair. For example, You could just as easily use Point1.weightingFactor_+Point2.weightingFactor+Distance(Point1, Point2)... or square the Z scored distances prior to multiplying by the weighting factors, etc, etc, etc. – russellpierce Aug 26 '14 at 15:23
  • As a tool to think about your problem... imagine you had a pair of points with distance 2 and a pair of points with distance four. Given that one of the points in each pair has a weighting factor of .5, what weighting factor would the second point in the distance 2 pair need in order to be as "good" as the distance four pair? – russellpierce Aug 26 '14 at 15:24
  • The criteria in this question are not sufficiently quantitative or specific to allow for an objective answer: "have large weighting factors" is too vague. Assuming you want these factors to be as large as possible, it would appear you are trying to maximize *three* objectives simultaneously: each of the two factors, together with the distance. Somehow you will need to identify a way to make trade-offs among these objectives, as asked at http://stats.stackexchange.com/q/9358. Is this the kind of thing you are after? – whuber Aug 26 '14 at 15:36
  • @whuber Thanks for your comments, and this is exactly what I am after. I want to maximize three objectives simultaneously, which is nearly impossible. Therefore, trade-offs must be made. The problem is, however, I do not have a good method of making trade-offs among these three objectives. – feelfree Aug 26 '14 at 15:52
  • OK. To what extent, then, does the thread I linked to fail to address your question? It seems to me that your question as currently stated is quite general, because it explains nothing about the meanings of these factors or distances, and therefore can be answered only by the generalities offered in that thread. Are there specific circumstances that would distinguish your question from that one and perhaps suggest specific answers? – whuber Aug 26 '14 at 15:57
  • 1
    @whuber Thanks for your comments. The link is very helpful, and my problem is very similar to the problem in the link. I have to admit that I have vague knowledge about the effect of these three factors when it comes to the problem of selecting the best point pair. – feelfree Aug 26 '14 at 16:28

0 Answers0