Workflow: Predicting a numeric variable with the Linear Regression block

IanBD
IanBD
Altair Employee
edited October 2022 in Altair RapidMiner

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.

  1. Import the bananas.csv dataset onto a Workflow canvas using the Text File Import block.
  2. Expand the Model Training group in the Workflow palette, then click and drag a Linear Regression block onto the Workflow canvas.
  3. Click Output port of the bananas dataset block and drag a connection towards the Input port of the Linear Regression block.
  4. Double-click the Linear Regression block to display the Configure Linear Regression dialog box.
  5. In the Configure Linear Regression dialog Box:
    1. In the Dependent variable drop-down list, select Mass(g).
    2. In the Unselected Regressors list, select Length(cm).
    3. Click Select to move the selected variable to the Selected Regressors list.
  6. 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.