Skip to content

PCA: Invalid memory access when specifiying the dimensions #727

@palonso

Description

@palonso

In PCA, featVector is defined as a matrix of size 1 x inputFeatureSize,

Array2D<Real> featVector(1,bands, 0.0);

However, in this line featVector is implicitly resized to 1 x outputFeatureSize,
featVector = matmult(featVector, reducedEig);

This causes an invalid memory access on the second iteration of the loop when inputFeatureSize != outputFeatureSize.

To reproduce the error set the parameter dimensions to anything smaller than the input feature size on any PCA routine.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions