LabVIEW Analytics and Machine Learning Toolkit API Reference

Set Anomaly Detection Model VI

  • Updated2023-02-21
  • 9 minute(s) read

Set Anomaly Detection Model VI

Owning Palette: Anomaly Detection VIs

Requires: Analytics and Machine Learning Toolkit

Sets properties for a trained anomaly detection model before deployment.

GMM-CV

model in specifies the information about the entire workflow of the model.
GMM baseline model specifies the properties of the GMM baseline model.

The following equation defines the GMM model:

where
K is the number of Gaussian mixture components. Each Gaussian mixture component represents a Gaussian distribution.
μi and Σi are the mean value and the covariance value of the ith Gaussian mixture component
αi is the weight of the ith Gaussian mixture component
hyperparameters specifies the hyperparameters to calculate the GMM baseline model from the data.
auto initialization specifies whether this VI automatically calculates the values in initial parameters using K-Means algorithm. The default is TRUE, which specifies that this VI automatically sets the values in initial parameters using K-Means algorithm.

If you do not specify values for the arrays in initial parameters and auto initialization is FALSE, this VI randomly calculates the values in initial parameters.
initial mean values specifies the initial mean values of all Gaussian distributions in the GMM model that this VI calculates.
initial covariance values specifies the initial covariance values of all Gaussian distributions in the GMM model that this VI calculates.
initial covariance matrix specifies the initial covariance matrix of each Gaussian distribution in the GMM model.
initial weights specifies the initial weights of all Gaussian distributions in the GMM model that this VI calculates.
number of clusters specifies the number of Gaussian distributions in the GMM model that this VI calculates.
regulator specifies the value that this VI adds to covariance to prevent the covariance matrix from converging to 0.
tolerance specifies the tolerance for the stopping criteria.
max iteration specifies the maximum number of optimization iterations for the stopping criteria. The model fitting stops if the number of optimization iterations reaches max iteration.
baseline model specifies the properties of the trained GMM baseline model.
weights specifies the weights of all Gaussian distributions in the trained GMM baseline model. The number of rows must equal number of clusters.
covariance values specifies the covariance values of all Gaussian distributions in the trained GMM baseline model. The array size must equal number of clusters.
covariance matrix specifies the covariance matrix of all Gaussian distributions in the GMM baseline model.
mean values specifies the mean values of all Gaussian distributions in the trained GMM baseline model. The number of rows must equal number of clusters.
error in describes error conditions that occur before this node runs. This input provides standard error in functionality.
model out returns the information about the entire workflow of the model. Wire model out to the reference input of a standard Property Node to get an AML Analytics Property Node.
error out contains error information. This output provides standard error out functionality.

One-Class SVM

model in specifies the information about the entire workflow of the model.
one-class SVM model specifies the properties of the one-class SVM model.

The following equation defines the one-class SVM model decision function:



where
sgn is the sign function
l is the number of support vectors
αi is the coefficient of the support vector
xi is the support vector
x is the test data
K(xi, x) is the kernel function of xi and x. Available kernel function types include linear, polynomial, radial basis, and sigmoid.
ρ is the decision function constant
kernel settings specifies settings to configure the kernel function.

This VI supports the following kernel functions:

Kernel functionDefinitionDescription
Linear functionx and y are the input sample vectors.
Polynomial functionx and y are the input sample vectors; gamma, coef0, and degree are the algorithm coefficients.
Radial basis functionx and y are the input sample vectors.
Sigmoid functionx and y are the input sample vectors; gamma and coef0 are the algorithm coefficients.
type specifies the type of the kernel function.

0Linear—Linear function
1Polynomial—Polynomial function
2RBF—Radial basis function
3Sigmoid—Sigmoid function
degree specifies the degree of the kernel.
gamma specifies the gamma of the kernel.
coef0 specifies the coef0 of the kernel.
number of support vectors specifies the number of support vectors.
support vectors specifies the support vectors. The number of rows must equal the number of support vectors and the number of columns must equal the number of features.
coefficients of support vectors specifies the coefficients of support vectors. The format of coefficients of support vectors is <number of classes - 1, number of support vectors>.
decision function constants specifies the decision function constants.
error in describes error conditions that occur before this node runs. This input provides standard error in functionality.
model out returns the information about the entire workflow of the model. Wire model out to the reference input of a standard Property Node to get an AML Analytics Property Node.
error out contains error information. This output provides standard error out functionality.

PCA T2Q

model in specifies the information about the entire workflow of the model.
PCA baseline model specifies the properties of the PCA baseline model.
mean values specifies the mean value of each feature in the training data.
eigenvectors specifies the eigenvectors to calculate the principal components. The number of rows must equal the number of features of the training data.
variance specifies the variance of the principal components. The number of rows must equal the number of principal components.
threshold for T2 specifies the threshold for T2 that you can use to determine whether the T2 values of the data for deployment are abnormal.
threshold for Q specifies the threshold for Q that you can use to determine whether the Q values of the data for deployment are abnormal.
error in describes error conditions that occur before this node runs. This input provides standard error in functionality.
model out returns the information about the entire workflow of the model. Wire model out to the reference input of a standard Property Node to get an AML Analytics Property Node.
error out contains error information. This output provides standard error out functionality.

SOM-MQE

model in specifies the information about the entire workflow of the model.
SOM baseline model specifies the properties of the SOM baseline model.
map vectors specifies the map vectors of the trained SOM baseline model.
MQE threshold specifies the MQE threshold that you can use to determine whether the MQE values of the data for deployment are abnormal.
map structure specifies the structure of the SOM baseline model.
row specifies the number of rows of the SOM baseline model.
column specifies the number of columns of the SOM baseline model.
lattice type specifies the lattice type of the SOM baseline model.

0rectangular (default)
1hexagonal


The following figure shows the rectangular lattice:



The following figure shows the hexagonal lattice:

error in describes error conditions that occur before this node runs. This input provides standard error in functionality.
model out returns the information about the entire workflow of the model. Wire model out to the reference input of a standard Property Node to get an AML Analytics Property Node.
error out contains error information. This output provides standard error out functionality.