Workflow: Predicting a numeric variable with the Linear Regression block
Ian Balanzá-Davis
Altair Employee
The Linear Regression block enables you to apply a linear regression predictive model to a dataset.
The following demonstrates how to use the Linear Regression block to predict the mass of a banana based on the other variables used to describe a banana in the input bananas.csv dataset.
- Import the bananas.csv dataset onto a Workflow canvas using the Text File Import block.
- Expand the Model Training group in the Workflow palette, then click and drag a Linear Regression block onto the Workflow canvas.
- Click Output port of the bananas dataset block and drag a connection towards the Input port of the Linear Regression block.
- Double-click the Linear Regression block to display the Configure Linear Regression dialog box.
- In the Configure Linear Regression dialog Box:
- In the Dependent variable drop-down list, select Mass(g).
- In the Unselected Regressors list, select Length(cm).
- Click Select to move the selected variable to the Selected Regressors list.
- Click OK to save the configuration and close the Configure Linear Regression dialog box.
A green execution status is displayed in the Output ports of the Linear Regression block and the new Linear Regression Model. The Linear Regression block output can be used with a Score block to make predictions on a dataset.
0