>  Docs Center  >  Libraries  >  Beaumont  >  PRICOM__DEFINE
Libraries

PRICOM__DEFINE

PRICOM__DEFINE

Purpose


  Projects a given vector onto the vector space defined by the
  principal compents, and returns the result

Inputs


  data: A vector to project

Keyword Parameters


  nterm: Set to an integer to project onto only the first nterm
        principal components.
  coeffs: Set to a variable to hold the coefficients of the linear
        combination of principal components. In other words, result
        = sum( coeff[i] * PC_i )

Outputs


  The projection of the input onto the principal components. This is
  equivalent to sum(coeff[i] * PC_i) where coeff[i] = sum(data *
  PC_i)

Modification History


  March 2010: Written by Chris Beaumont
  April 2010: Fixed a bug that crashed this function when called with
              only one data point. cnb
  April 2010: Number of returned coeffs matches nterm. cnb.
  August 2010: Truncated intermediate arrays when nterm <
              ndim. Speeds up execution. cnb.
  August 10 2010: Further optimization when nterm < ndim. cnb.
  August 18 2010: Fixed spelling error in definition of get_mean. cnb.



© 2024 NV5 Geospatial Solutions, Inc. |  Legal
   Contact Us