Skip to main content
. 2023 Oct 15;23(20):8477. doi: 10.3390/s23208477
Algorithm 1: Obtaining principal component (PC)-based features
The data matrix D=(d1 d2dN) of size MxN where di represents the ith sample from the data matrix, where i = 1, , N and N is the number of examples in data matrix.
  • S1: Scale the values of the data matrix in [0, 1]. Resulting matrix is called Ds.

  • S2: Calculate the principal components (PCs) of the Ds.

  • S3: Select the PCs corresponding to K highest eigenvalues.

  • S4: Construct the matrix whose columns are formed by the principal component vectors (eigenvectors of Ds) C = (c1 c2 cK) with the size of MxK.

  • S5: Calculate the feature matrix by

          F = DsT C = (d1c1 d1c2 d1cK) with the size of NxK.

    Although the algorithm ends in this step, the following step demonstrates the effectiveness of the generated features.

  • S6: Train a classifier (such as SVM or MDC) by the rows of the matrix F.