Getting Started with Machine Learning (Analytics and Machine Learning Toolkit)

LabVIEW 2018 Analytics and Machine Learning Toolkit Help

Edition Date: July 2018

Part Number: 377059B-01

»View Product Info
Download Help (Windows Only)

You can create an application to train machine learning models using the Analytics and Machine Learning Toolkit. Depending on the amount of training data, you choose to use the one shot or batch training mode.

One Shot Training

Use the one shot training mode when you have a small amount of data and memory allows loading the data all at once for model training.

The following figure shows an example of using the one shot training mode to train a principal component analysis (PCA) model.

The following events occur in the previous figure.

The Load Data (2D Array) VI loads raw data for model training. Wire a 2D array of training data to data and select the Training instance of this VI.
The PCA VI trains the PCA model using the PCA settings you specify. In this example, select the One Shot instance of this VI.
The Load Data (2D Array) VI loads raw testing data. Wire a 2D array of testing data to data and select the Deployment instance of this VI.
The Deploy Feature Manipulation Model VI deploys the trained feature manipulation model and returns the transformed data.

Batch Training

Use the batch training mode when you have a large number of data files but you cannot concatenate them into a large data matrix for model training due to memory constraints. Instead of consolidating all data, you can divide the data into several blocks and input one block at a time for model training so that model parameters are updated continuously. You can input as many files as you want to train the model until the model is ready for deployment.

The following figure shows an example of using the batch training mode to train a PCA model. Use a For Loop to control data coming in block by block and repeatedly load the training data one block at a time.

The following events occur in the previous figure.

The Recursive File List VI lists all the files in the training data folder.
The Read Delimited Spreadsheet VI reads the training data block by block.
The Load Data (2D Array) VI loads one block of training data at a time. Wire the array of training data to data and select the Training instance of this VI.
The PCA VI trains and updates the PCA model block by block. In this example, select the Batch instance of this VI and wire number of components to the VI.
The Load Data (2D Array) VI loads raw testing data. Wire a 2D array of testing data to data and select the Deployment instance of this VI.
The Deploy Feature Manipulation Model VI deploys the trained feature manipulation model and returns the transformed data.

WAS THIS ARTICLE HELPFUL?

Not Helpful