LabVIEW Analytics and Machine Learning Toolkit API Reference

Content Type
Programming Language
Current manual

Initialize Anomaly Detection Model (PCA T2Q) VI

Initialize Anomaly Detection Model (PCA T2Q) VI

Owning Palette: Anomaly Detection VIs

Requires: Analytics and Machine Learning Toolkit

Initializes the hyperparameters of the principal component analysis (PCA) algorithm.

The T2-statistic measures the variation in each sample and indicates the distance of each sample from the center of the PCA model. The Q-statistic indicates how well each sample conforms to the PCA model by measuring the distance that a data point falls from the PCA model.

The Deploy Anomaly Detection Model VI uses health index to return the T2 value and the Q value.

You can initialize a PCA model for batch training with this VI when you have a large training data set.

Examples

One Shot

hyperparameters specifies the hyperparameters of the PCA baseline model.
PCA settings specifies the method and value for this VI to calculate the number of principal components.
criteria specifies the method for this VI to calculate the number of principal components.

0number of components (default)—Directly specifies the number of principal components.
1ratio of variance—Specifies the ratio of variance for this VI to calculate the number of principal components.
number of components specifies the number of principal components. This input is valid only if criteria is number of components.
ratio of variance specifies the ratio of the variance in principal components to the total variance. This VI automatically calculates the number of components. The default is 0.95. This input is valid only if criteria is ratio of variance.
confidence level specifies the confidence level for calculating the suggested threshold of T2 and Q. You can use the suggested threshold to detect anomalies. The default is 0.95. You can access the suggested threshold by the AML PCA T2Q Property Node.
error in describes error conditions that occur before this node runs. This input provides standard error in functionality.
untrained PCA baseline model returns the initialized PCA baseline model for training.
error out contains error information. This output provides standard error out functionality.

Batch

hyperparameters specifies the hyperparameters of the PCA baseline model.
number of components specifies the number of principal components in the batch. The default is 2. number of components must be reasonable to avoid too much memory usage for a single batch. For the first batch data, number of components must be less than or equal to the number of rows in the training data. Starting from the second batch data, number of components can be 1 or any number that fits in the computation capacity.
confidence level specifies the confidence level for calculating the suggested threshold of T2 and Q. You can use the suggested threshold to detect anomalies. The default is 0.95. You can access the suggested threshold by the AML PCA T2Q Property Node.
error in describes error conditions that occur before this node runs. This input provides standard error in functionality.
untrained PCA baseline model returns the initialized PCA baseline model for training.
error out contains error information. This output provides standard error out functionality.

Examples

Refer to the following VIs for examples of using the Initialize Anomaly Detection Model (PCA T2Q) VI:

  • Anomaly Detection (Training) VI: labview\examples\AML\Anomaly Detection
  • Anomaly Detection (Training) (Batch) VI: labview\examples\AML\Anomaly Detection
In This Section
Was this information helpful?