Re: 3D distance problem




On 6-Oct-2005, "alphapoint05" <millerjm@xxxxxxx> wrote:

> I have to keep the actual variables confidential for now, but I could
> frame it this way. Suppose I have 3 cognitive variables. From previous
> analyses, these 3 variables have been applied to 20 different car
> brands with large samples and replication. So, I now have a relatively
> good idea of the average score on each variable and for each car brand.
> I take a 3D plot and plot the 20 car brands based on their 3 variable
> scores. I then take a new sample who all have scores on the 3 variables
> but not in reference to any of these car brands. I now plot that
> subject's score on the 3D plot. I want to know which car brand is
> closest, second closest, etc for this person and then over all people
> in rank-order.
>
> As for the weighting, I know from strong theory that the third variable
> isn't as influential. When plotting in 2D space without that third
> variable, the person is close to Honda. However, suppose the Honda
> score for the third variable is very different from the subject's score
> for the third variable. In this case, the closest car could be very far
> from Honda simply due to the influence of this third variable. So, I'd
> like to find a way, maybe a boundary constraint, that keep selection of
> the nearest car within a range based on the first two variables. It
> would be even better to find a way to determine that constraint based
> on the influence of the third variable rather than on an aribitrary
> decision.

You didn't directly respond to my suggestion that you compute a weighted
distance, so I'm not sure if we are on the same page in terms of a solution.

There are many possible ways to do the weighting. For example, you could use
a simple weighting coefficient for each of the x,y,z distances, or you could
set the weighted distance to a very large number if it exceeded some
threshold value, or you could use a non-linear function like distance^3 or
exp(distance), or you could use a combination of these. It may be possible
to perform a (non)linear regression to determine the optimal weighting
coefficients.

> What do you mean by "exponentially increasing cost"?

if (actual_distance <= threshold) {
weighted_distance = actual_distance;
} else {
weighted_distance = actual_distance + exp(actual_distance -
threshold);
}

The reason I asked about the "big picture" is that there are other types of
models than distance measures to determine the best category for a
prediction. I don't know if distance measures are the best type of
predictive model for your problem.

--
Phil Sherrod
(phil.sherrod 'at' sandh.com)
http://www.dtreg.com (decision tree and SVM predictive modeling)
http://www.nlreg.com (nonlinear regression)
.



Relevant Pages

  • Re: interpolation for a color image?
    ... But the distance from 1, which should also be taken into account statistically, is at ... Even if you are using weighting factors, you end up with something else (weighted ... Remember the saying, "All that is necessary for evil to succeed is ...
    (sci.image.processing)
  • Re: interpolation for a color image?
    ... But the distance from 1, which should also be taken into account statistically, is at ... Even if you are using weighting factors, you end up with something else (weighted ... average) other than true bilinear interpolation. ... Remember the saying, "All that is necessary for evil to succeed is ...
    (sci.image.processing)
  • Re: interpolation for a color image?
    ... Harris wrote: ... But the distance from 1, which should also be taken into account statistically, is at distance sqrt. ... Even if you are using weighting factors, you end up with something else other than true bilinear interpolation. ... Martin Leese ...
    (sci.image.processing)
  • Re: Under what condition is Mahalanobis distance OPTIMAL?
    ... There are so many kinds of distance metrics. ... Is there a way one can show under what conditions the Mahalanobis ... better than Euclidean distance when the axes have different weighting, ...
    (sci.math)
  • Re: Under what condition is Mahalanobis distance OPTIMAL?
    ... There are so many kinds of distance metrics. ... Is there a way one can show under what conditions the Mahalanobis ... better than Euclidean distance when the axes have different weighting, ...
    (sci.stat.math)