From: <HIDDEN>
Newsgroups: comp.soft-sys.matlab
Subject: Re: Procrustes Analysis without Reflection
Date: Mon, 12 May 2008 15:23:04 +0000 (UTC)
Organization: The MathWorks, Inc.
Lines: 44
Message-ID: <g09nco$6f1$>
References: <>
Reply-To: <HIDDEN>
Content-Type: text/plain; charset="ISO-8859-1"
Content-Transfer-Encoding: 8bit
X-Trace: 1210605784 6625 (12 May 2008 15:23:04 GMT)
NNTP-Posting-Date: Mon, 12 May 2008 15:23:04 +0000 (UTC)
X-Newsreader: MATLAB Central Newsreader 1187260
Xref: comp.soft-sys.matlab:467923

rizwindu <> wrote in message <435f98ff->...
> Hi all,
> I'm working on a problem that requires the procrustes alignment of two
> sets of data, but it is important that the proposed transformation
> does not allow reflection. The MatLab procrustes function allows this
> and I was wondering if anyone knows of a freely available m-file that
> will perform Procrustes analysis without allowing reflection.
> Thanks in advance,
> Ben.
  This must be a hasty reply because I have a doctor's appointment in just a 
few minutes.  Later in the day I can send a more complete response.

  If X and Y are the two n x m data sets in question where n is the number of 
data items and m the number of components to the data, then one step of 
the procrustes procedure is to do a singular value decomposition, 'svd', on 
the m x m matrix X'*Y, getting

 X'*Y = U*S*V'

where U and V are unitary matrices and S is diagonal with the non-negative 
singular values.  The best fitting unitary transformation in the least squares 
sense is given by Q = V*U'.  However, if it turns out that Q involves a 
reflection, that is, its determinant is -1, then what you need to do is reverse 
the sign in the rightmost column of either U or V, corresponding to the 
smallest singular value.  Then do Q = V*U' with the modified U or V, and you 
get a unitary transformation without reflection which is the best fit among 
such non-reflective transformations.  The translation and scaling steps 
remain the same.

  It should be said that if you would have had a reasonably close fit using a 
reflected transformation and the smallest singular value is fairly large, then 
you will get a comparatively poor fit with the best non-reflected 
transformation.  It would be analogous to trying to fit the corresponding 
vertices of a fat triangle onto its mirror image without turning it over.

  More later.  I must go now.  My apologies.

Roger Stafford