[R] distance coefficient for amatrix with ngative valus
Rolf Turner
rolf.turner at xtra.co.nz
Tue Oct 4 08:06:50 CEST 2011
On 04/10/11 17:05, R. Michael Weylandt wrote:
<SNIP>
> More importantly, as I said in my initial response, any distance
> metric worth its salt is translation invariant.
<SNIP>
Point of order, Mr. Chairman. (This is really *toadally* off topic;
my apologies, but I couldn't resist --- I trained as a pure mathematician).
A *metric* need not in general be translation invariant. Indeed a metric
need not be defined on a space in which translation makes any sense.
A metric defined in terms of a *norm* (on a normed vector space) by
rho(x,y) = ||x - y|| is of course by definition translation invariant,
and that's
what most of us think in terms of.
But there are perfectly ``reasonable'' metrics, defined on vector spaces,
which are not translation invariant. Whether these are ``worth their salt''
is I suppose a matter of taste. (You should pardon the expression. :-) )
A simple e.g. of a non-translation-invariant metric is
rho(x,y) = |x - y|/(1 + |x| + |y|)
(defined on the real line). It is easily checked that rho(.,.)
satisfies the
four conditions that a metric must satisfy. (Exercise for the interested
reader.)
Note that rho(1,2) = 1/4 but rho(2,3) = 1/6, ergo not translation
invariant.
cheers,
Rolf Turner
More information about the R-help
mailing list