Table of Contents

Method PCAComputeVar

Namespace
OpenCvSharp
Assembly
OpenCvSharp.dll

PCAComputeVar(InputArray, InputOutputArray, OutputArray, double)

PCA of the supplied dataset.

public static void PCAComputeVar(InputArray data, InputOutputArray mean, OutputArray eigenvectors, double retainedVariance)

Parameters

data InputArray

input samples stored as the matrix rows or as the matrix columns.

mean InputOutputArray

optional mean value; if the matrix is empty (noArray()), the mean is computed from the data.

eigenvectors OutputArray

eigenvectors of the covariation matrix

retainedVariance double

Percentage of variance that PCA should retain. Using this parameter will let the PCA decided how many components to retain but it will always keep at least 2.

PCAComputeVar(InputArray, InputOutputArray, OutputArray, OutputArray, double)

PCA of the supplied dataset.

public static void PCAComputeVar(InputArray data, InputOutputArray mean, OutputArray eigenvectors, OutputArray eigenvalues, double retainedVariance)

Parameters

data InputArray

input samples stored as the matrix rows or as the matrix columns.

mean InputOutputArray

optional mean value; if the matrix is empty (noArray()), the mean is computed from the data.

eigenvectors OutputArray

eigenvectors of the covariation matrix

eigenvalues OutputArray

eigenvalues of the covariation matrix

retainedVariance double

Percentage of variance that PCA should retain. Using this parameter will let the PCA decided how many components to retain but it will always keep at least 2.