3
$\begingroup$

From what is told on page 268 of the Polarimetric Radar Imaging: From Basics To Applications:

enter image description here

I have written the following code for wishart distance calculation in Matlab:

function distance = WishartDistance(Cm,Z)
    distance = log(det(Cm))+trace(Cm\Z);
end

But for matrices $C_m$ and $Z$ in the following:

enter image description here

enter image description here

I get the negative answer:

$$-8.2715$$

I want to see if the formula should be written as

$$d_3(Z,\omega_m)=|\ln|C_m|+\text{Tr}(C_m^{-1}Z)|$$

Or is an absolute value omitted in the book incorrectly?

$\endgroup$
6
  • $\begingroup$ I don't know this field at all, but I think that d is the log of a distance measure that's always positive. Look at the paragraph above Eq. 8.11 - they start with a measure based on the Wishart PDF (which is always positive), then they take the log to get the "distance" function. This isn't a distance in the sense of a distance metric, but I guess they just want to know whether distances increase or decrease to classify - so the log transform is fine. $\endgroup$
    – AJK
    Commented Oct 1, 2017 at 17:20
  • 2
    $\begingroup$ Basically, I think the book's equation is correct, and it is OK that d_3 is negative, and the only problem is that calling it a "distance" rather than a "score" or something similar is a little confusing. $\endgroup$
    – AJK
    Commented Oct 1, 2017 at 17:24
  • 2
    $\begingroup$ p. 2 of cv.tu-berlin.de/fileadmin/fg140/Clustering_by_deterministic.pdf : "In [1] a distance measure ... was developed based on the Wishart distribution. Unfortunately this distance measure is not a metric, because it is neither homogeneous, nor symmetric and does not fullfill the triangle inequality." Nonetheless this distance measure is often used and showed its effectiveness in practice. Because of this and its direct relation to the density function it will be also used in this work. $\endgroup$ Commented Oct 1, 2017 at 19:06
  • $\begingroup$ so @MarkL.Stone it says that in spite of not being a real metric but it is effective and so the classification results should be good. But in my case, I get really incorrect classification results and I really don't understand why? $\endgroup$ Commented Oct 1, 2017 at 19:45
  • 1
    $\begingroup$ Just to be clear, the end quote in my comment should have been at the end of the comment. The claim "showed its effectiveness in practice" was made by the authors of the article I linked, not by me. I agree it's not a distance metric, despite its name. I have nothing to offer regarding its effectiveness. $\endgroup$ Commented Oct 1, 2017 at 19:52

1 Answer 1

2
$\begingroup$

Can any sensible distance measure be negative? No.

Consider this. Can you have a distance that is closer than zero? If you do then what is the meaning of it?

The beginning of the page 268 from your book describes how they got the distance measure: it's based on the natural log of the probability density. The density is based on Wishart distribution. When a matrix Z is close to matrix C, the probability density is high, and this probability density is low when C is not similar to Z.

So, for low probabilities, the log will be negative, making your measure become negative too. Hence, this measure is not a good distance. Apparently, it's still good enough for the classifier that is used in this domain.

A good distance measure will have several properties including non-negativity and triangle inequality.

$\endgroup$
6
  • 3
    $\begingroup$ This does not really answer the question. If you have a different question, you can ask it by clicking Ask Question. You can also add a bounty to draw more attention to this question. - From Review $\endgroup$
    – Ferdi
    Commented Oct 1, 2017 at 17:05
  • $\begingroup$ @Ferdi this answers OP's question. I'm not sure yoy what you mean. $\endgroup$
    – Aksakal
    Commented Oct 1, 2017 at 17:10
  • 1
    $\begingroup$ I know it can't be but consider two matrices $A=\begin{bmatrix}0.75 & 0 & 0\\0 & 0.5 0\\0 & 0 & 0.25\end{bmatrix}$ and $B=\begin{bmatrix}0.5 & 0 & 0\\0 & 0.25 0\\0 & 0 & 0.125\end{bmatrix}$ both of them are positive definite. then surely we will have $|A|=0.09375$ and $\ln|A|=-2.3671$ and $A^{-1}B=\begin{bmatrix}0.66 & 0 & 0\\0 & 0.5 0\\0 & 0 & 0.5\end{bmatrix}$ and $\text{Tr}(A^{-1}B)=1.66$ and we will have $\ln|A|+\text{Tr}(A^{-1}B)=-2.3671+1.66=-0.7071\lt 0$. I mean it seems that either the formula in the book is incorrect or I am doing something wrong $\endgroup$ Commented Oct 1, 2017 at 17:15
  • $\begingroup$ Perhaps edit your new example into the question? $\endgroup$
    – mdewey
    Commented Oct 1, 2017 at 20:47
  • 1
    $\begingroup$ @sepideh, the formula is correct only because it's the one used in this domain. They call thing thing a distance measure. I bet it's because it's not a sensible distance. It doesn't have any features of the distance, such as subadditivity. It's something that can be used in this classifier $\endgroup$
    – Aksakal
    Commented Oct 2, 2017 at 3:13

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.