Example

This example demonstrates how to use the Regression Agent to predict values.

The test data used in this example contains eight features (Summary, PrecipitationType, Humidity, WindSpeed, WindBearing, Visibility, Pressure, DetailedSummary) and one class variable (Temperature). The objective is to predict the value of Temperature based on the nine features available.

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

Step 1: Add the Agent

Drag the Regression 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 Fast Forest. Drag the training data file to the training property and the features grid is auto-populated from the training file data.

Set the Data Type of Summary, PrecipitationType, and Detailed Summary to String.

Set the Variable Type of Temperature to Class Variable.

Step 4: Configure Algorithm Parameters

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 Value column of the printed events to see the Temperature value predicted by the Agent based on the 8 feature values.

The value predicted can also be confirmed by comparing the Temperature and Predicted Value columns.

Files

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

Last updated