This example demonstrates how to use the Binary Classification Agent to categorize events into two classes using the Fast Forest algorithm.
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 is either 0 (Malfunction) or 1 (Working).
Refer to configuration to understand all configuration options of this Agent.

Step 1: Add the Agent

Drag the Binary 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 the Agent

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 Fast Forest. Drag the training data file to the training property. 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 Boolean.
Set the 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 4: Input Mapping

Select the arrow entering the input endpoint and click Configure.
Map the test data attribute to each training data attribute.

Step 5: 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. A true value indicates that the pump is working and a false value denotes a malfunction.
The value assigned can also be confirmed by comparing the Class and Predicted Label columns.


Security Key
Data Stream
Binary Classification Example.xuc
Training Data
Training Data.csv
Test Data
Test Data.csv
See the Import, Export, and Clone - XMPro article for steps to import a Data Stream.