Developer Guide for Intel® Data Analytics Acceleration Library 2016 Update 4

Batch Processing

Algorithm Input

The PCA algorithm accepts the input described below. Pass the Input ID as a parameter to the methods that provide input for your algorithm. For more details, see Algorithms.

Input ID

Input

data

Use when the input data is a normalized or non-normalized data set. Pointer to the n x p numeric table that contains the input data set. This input can be an object of any class derived from NumericTable.

correlation

Use when the input data is a correlation matrix. Pointer to the p x p numeric table that contains the correlation matrix. This input can be an object of any class derived from NumericTable except PackedTriangularMatrix.

Algorithm Parameters

The PCA algorithm has the following parameters, depending on the computation method parameter method:

Parameter

method

Default Value

Description

algorithmFPType

defaultDense or svdDense

double

The floating-point type that the algorithm uses for intermediate computations. Can be float or double.

method

Not applicable

defaultDense

Available methods for PCA computation:

  • defaultDense - the correlation method
  • svdDense - the SVD method
covariance

defaultDense

SharedPtr<covariance::Batch<algorithmFPType, covariance::defaultDense> >

The correlation and variance-covariance matrices algorithm to be used for PCA computations with the correlation method. For details, see Correlation and Variance-covariance Matrices. Batch Processing.

Algorithm Output

The PCA algorithm calculates the results described below. Pass the Result ID as a parameter to the methods that access the results of your algorithm. For more details, see Algorithms.

Result ID

Result

eigenvalues

Pointer to the 1 x p numeric table that contains eigenvalues in the descending order. By default, this result is an object of the HomogenNumericTable class, but you can define the result as an object of any class derived from NumericTable except PackedSymmetricMatrix, PackedTriangularMatrix, and CSRNumericTable.

eigenvectors

Pointer to the p x p numeric table that contains eigenvectors in the row-major order. By default, this result is an object of the HomogenNumericTable class, but you can define the result as an object of any class derived from NumericTable except PackedSymmetricMatrix, PackedTriangularMatrix, and CSRNumericTable.

Examples

C++:

Java*: