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 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 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 | float | 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: For CPU:
For GPU:
|
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. |
normalization | svdDense | SharedPtr<normalization::zscore::Batch<algorithmFPType, normalization::zscore::defaultDense>> | The data normalization algorithm to be used for PCA computations with
the SVD method. |
nComponents | defaultDense , svdDense | The number of principal components | |
isDeterministic | defaultDense , svdDense | false | If true, the algorithm applies the “sign flip” technique to the results. |
resultsToCompute | defaultDense , svdDense | none | The 64-bit integer flag that specifies which optional result to compute. Provide one of the following values to request a single characteristic
or use bitwise OR to request a combination of the characteristics:
|
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.Result ID | Result |
---|---|
eigenvalues | Pointer to the 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 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 . |
means | Pointer to the |
variances | Pointer to the |
dataForTransform | Pointer to key value data collection containing the aggregated data for
normalization and whitening with the following key value pairs:
If resultsToCompute does not contain mean, the dataForTransform means
table is NULL. If resultsToCompute does not contain variances, the
dataForTransform variances table is NULL. If resultsToCompute does not
contain eigenvalues, the dataForTransform eigenvalues table is NULL. |
Please note the following:
- If the function result is not requested through theresultsToComputeparameter, the respective element of the result contains a NULL pointer.
- By default, each numeric table specified by the collection elements is an object of theHomogenNumericTableclass, but you can define the result as an object of any class derived fromNumericTable, except forPackedSymmetricMatrix,PackedTriangularMatrix, andCSRNumericTable.
- For thesvdDensemethod
should not be less than
. If
, svdDense returns an error.