This example demonstrates how to use the Multi-Class Classification Agent to categorize events into two or more classes.

The test data used in this example contains ten features (AssetId, Temperature, Proximity, Pressure, Level, Sound, Moisture, Throughput, Flow, Humidity) and one class variable (Class) for a pump. The value of the class variable can be either Malfunction, Working, or Stopped.

Refer to configuration to understand all configuration options of this Agent.

Step 1: Add the Agent

Drag the Multi-Class Classification Agent onto the canvas, link the input endpoint to the test data, the output to the printer, and save the Data Stream.

Step 2: Configure General

Select the Agent and click Configure. In this case, keep the default Collection.

Step 3: Configure Training

Set the learning algorithm and parameters.

In this case, leave the learning algorithm as Naive Bayes. Drag the training data file to the training property and the features grid is auto-populated from the training file data.

Set the Variable Type of AssetId to Exclude as this feature is not needed in the training.

Set the Variable Type of Class to Class Variable and change the data type to String.

Step 4: Configure Model Options

Set cross validation folds to 3 to avoid overfitting in the model and leave the other options unchanged.

Apply the changes and save the Data Stream.

Step 5: Input Mapping

Select the arrow entering the input endpoint and click Configure.

Map the test data attribute to each training data attribute.

Step 6: Results

Apply the changes, save the Data Stream, and publish it.

Let's look at the Live Data View. Observe the Predicted Label column of the printed events. Based on the ten feature values, each row is assigned a value of Working, Malfunction, or Stopped.

The value assigned can also be confirmed by comparing the Class and Predicted Label columns.


See the Import, Export, and Clone - XMPro article for steps to import a Data Stream.

Last updated