BOOTSTRAP (klibm) functions


LIBRARY ROUTINE

kdmatrix_princ_axis - obtain the principle axis of a covariance matrix.

LIBRARY CALL

int kdmatrix_princ_axis(
   double *a,
   int    n,
   double *y)

INPUT

OUTPUT

RETURN VALUE

TRUE (1) on success, otherwise it returns FALSE (0) if this function is unable to allocate sufficient memory for the operation.

DESCRIPTION

kdmatrix_princ_axis() obtains the principal axis (the eigenvector associated with the largest eigenvalue) for the covariance matrix "a" of size n by n. Put the principal eigenvector in the place pointed to by "y".

The power iteration method to obtain the dominant eigenvalue and its associated eigenvector as described in Gollub and VanLoan, MATRIX COMPUTATIONS, pp 209.

ADDITIONAL INFORMATION

none

EXAMPLES

none

SIDE EFFECTS

none

RESTRICTIONS

Since a is a covariance matrix it is symmetric, real, and very likely to be positive definate. It is positive semidefinate for sure, and may also be diagonal dominant.

Other possible difficulties: The major hitch in this technique is that the convergence is proportional to lambda(2)/lambda(1) where lambda(1) is the dominant eigenvector. If these eigenvalues are closely spaced then we won't get a decent eigenvector (it will have an incorrect direction).

Fortunately, when using the principal axis to split a cluster and there are two very strongly dominant axes with the same ellipticity, then we can split on any combination of those axis and reduce the cluster variances greatly.

The 10 iterations used in the code have been found to be satisfactory for all of the data so far encountered unless it is an ugly special case.

MODIFICATION

Converted from get_princ_axis() in Khoros 1.0 (JW)

FILES

$BOOTSTRAP/objects/library/klibm/src/dmatrix.c

SEE ALSO

klibm(3)

COPYRIGHT

Copyright (C) 1993 - 1997, Khoral Research, Inc. ("KRI") All rights reserved.