Hexagon Geospatial
MENU

Spatial Modeler Tutorials

Learn more about our products, find answers, get the latest updates, and connect with other Hexagon Geospatial product users, or get support from our professional service team.
Showing results for 
Search instead for 
Do you mean 

Report Factor Loadings (Correlation) between Principal Components and Input Bands

by Technical Evangelist ‎09-07-2018 12:22 PM - edited ‎10-01-2018 10:07 AM (536 Views)

Download model

Description:

Derive the Factor Loadings of each input band to each Principal Component as part of Principal Component Analysis. Factor Loadings are described in Jensen, John R, "Introductory Digital Image Processing" Third Edition, p297 - 299. They can also be described as the degree of correlation between each input band and each principal component. As such they are useful for determining which input bands contribute most to the higher order Principal Components.

 

The screenshots and tables shown in this article were derived from a Landsat 8, 7-band image of northern Georgia, USA.

 

Landsat 8 image (5,4,3) on the left, derived Principal Components (PC1, PC2, PC3) on the right
PCA_Results.PNG

 

This model simply takes the input multispectral image, derives the Factor Loadings and sends them to a Report text file (e.g. for loading into Excel).

 

pc_factor_loadings_v16_5_1.gmdx
PCA_Loadings_Model.PNG
 
Table to Matrix submodels:
Table to Matrix Submodel.PNG

 

The output is a matrix organised such that the columns are the Principal Components (in ascending order, left to right) and the rows are the input Bands (in ascending order, top to bottom), like this:

 

 

  PC 1 PC 2 PC 3 PC 4 PC 5 PC 6 PC 7
Band 1 0.613 0.473 -0.599 -0.013 0.199 -0.023 -0.037
Band 2 0.637 0.513 -0.558 -0.025 0.131 -0.008 0.035
Band 3 0.762 0.410 -0.471 -0.073 -0.078 0.135 -0.004
Band 4 0.730 0.582 -0.338 -0.018 -0.092 -0.069 -0.001
Band 5 0.506 -0.861 -0.045 0.012 -0.002 -0.002 0.000
Band 6 0.949 0.242 0.190 -0.074 0.011 -0.002 0.000
Band 7 0.852 0.501 0.075 0.136 0.002 0.010 0.000

 

For example in the table above, Principal Component 1 has a correlation of 0.613 with input Band 1, a correlation of 0.730 with Band 4 and a correlation of 0.852 with Band 7. Principal Component 2 is most highly correlated with Bands 5 (in an inverse fashion), 4 and 2. Etc.

 

This model does not calculate a Principal Components image. But if desired this model could be easily combined with other Principal Component Analysis models, such as the one described here (https://community.hexagongeospatial.com/t5/Spatial-Recipes/Calculate-Principal-Components-and-Report...) to offer one model which generates several derivative PCA products, including a PC image. 

 

Input parameters: 

Input MS Image:  Filename for the input multispectral image to have Principal Components Analysis performed on it and Loading Factors derived

Skip Factor: Enter an integer statistics sampling factor.  Larger numbers will increase processing speed at the expense of some accuracy. 1 uses all pixel values, 4 uses every fourth row and column value, etc.

Factor Loadings Text File: Name of the output text file to create with the  Loading Factors.

 

PCA_Dialog.png

 

 

Courses
Contributors