X
PrevPrev Go to previous topic
NextNext Go to next topic
Last Post 13 Nov 2018 01:40 PM by  Dulci Avouris
Statistics Calculations
 6 Replies
Sort:
You are not authorized to post a reply.
Author Messages

Dulci Avouris



New Member


Posts:51
New Member


--
09 Nov 2018 01:32 PM
    I have calculated the statistics for an image raster (that has been masked, and contains NaN values) using the ENVI calculate statistics GUI, and the ENVIRasterStatisticsTask. These two options give me the exact same eigenvectors and eigenvalues for my raster.

    However, I am using these statistics for a PCA rotation. When I use the ENVI Forward Rotation with New Statistics GUI tool, the resulting eigenvectors and eigenvalues are NOT the same as calculated with the statistics only tools. This is a concern, because I understood that that statistics were calculated before the transformation, and therefore the results from each of these tools should be identical.

    Can you please explain why this result occurred, and how to generate the statistics file from the ENVI forward rotation GUI using IDL code?

    Thank you for your help!

    MariM



    Veteran Member


    Posts:2396
    Veteran Member


    --
    09 Nov 2018 02:03 PM
    In the PCA, did you choose to use covariance or correlation? The default is covariance and this is what is shown when you use Compute Statistics with covariance calculation.
    I tested this with the qb_boulder_msi image that comes in the ENVI distribution and the covariance stats calculated from Compute Statistics and the covariance stats in the output statistics file from PCA (using covariance calculation) were identical. This is not the case if I choose correlation calculation in PCA.

    Dulci Avouris



    New Member


    Posts:51
    New Member


    --
    10 Nov 2018 04:21 PM
    Hello,

    I have 4 cases: 1) ENVI calculate statistics GUI. 2) ENVIRasterStatisticsTask. Both these options (1 &2) give me the same eigenvectors & eigenvalues.
    3) ENVI PCA Forward Rotation with New Statistics GUI: Correlation. 4) ENVI PCA Forward Rotation with New Statistics GUI: Covariance. Both these options (3 & 4) give me the same eigenvalues and eigenvectors, which are different than the eigenvector/value produces by cases 1 & 2.

    I will clear out my saved files and run the calculations again to make sure I didn't get something mixed up. I want the ENVIRasterStatisticsTask to produce the same eigenvector/values as the ENVI PCA Forward Rotation with New Statistics GUI: Correlation.

    What I want to do is calculate the PCA eigenvector & eigenvalues of a raster using correlation. I just need that data, I don't need the PCA raster product.

    What am I missing? Thank you!

    Cheers,
    Dulci

    MariM



    Veteran Member


    Posts:2396
    Veteran Member


    --
    12 Nov 2018 07:24 AM
    Do you see this same behavior using the sample dataset, qb_boulder_msi? The covariance statistics from the task and Calculate Statistics should be the same as the covariance statistics from a forward PCA.

    Dulci Avouris



    New Member


    Posts:51
    New Member


    --
    13 Nov 2018 08:53 AM
    Hello!

    I cleared out my saved files and ran the statistics again. This time, the task results, the calculate statistics results, and the forward PCA with covariance results were all the same. The forward PCA with correlation was different. I must have mixed up the files.

    So the actual question is: is there a way for me to generate the correlation eigenvalues & eigenvectors in IDL using an ENVI task or IDL function?

    Thank you!

    MariM



    Veteran Member


    Posts:2396
    Veteran Member


    --
    13 Nov 2018 01:37 PM
    You could use la_eigenproblem and pass the correlation matrix and obtain the eigenvectors and eigenvalues.

    Dulci Avouris



    New Member


    Posts:51
    New Member


    --
    13 Nov 2018 01:40 PM
    Ok. Thanks! I will try it out.

    Cheers,
    Dulci
    You are not authorized to post a reply.