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.
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.
Select the Agent and click Configure. In this case, keep the default Collection.
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.
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.
Select the arrow entering the input endpoint and click Configure.
Map the test data attribute to each training data attribute.
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.