Step 1: Create a Random Forests Regression model in Minitab Statistical Software

We use the Ames housing data to create a Random Forests® Regression model in Minitab.

  1. Open the sample data, AmesHousing.csv.
  2. Choose Predictive Analytics Module > Random Forests® Regression.
  3. In Response, enter 'Sale Price'.
  4. In Continuous predictors, enter 'Lot Area', 'Total Basement SF', '1st Floor SF', '2nd Floor SF', 'Garage Area SF', 'Total Rooms', 'Year Built', and 'Year Remod/Add''.
  5. In Categorical predictors, enter Zoning, Type, 'Heating Quality', 'Fireplace Quality', and 'Exterior Quality''.
  6. Select Validation.
  7. In Validation method, select Validation with a test set in addition to out-of-bag data.
  8. Select Randomly select a fraction of rows as a test set.
  9. In Fraction of rows, enter 0.3.
  10. Select Store ID column for training/test split.
  11. Select OK in each dialog box.
Random Forests® Regression: Sale Price vs Lot Area, Total Basement SF, 1st Floor SF, 2nd Floor SF, Garage Area SF, Total Rooms, Year Built, Year Remod/Add, Zoning, Type, Heating Quality, Kitchen Quality, Fireplace Quality, Exterior Quality

Method

Model validation70/30% training/test sets
Number of bootstrap samples300
    Sample sizeSame as training data size of 2047
Number of predictors selected for node splittingSquare root of the total number of predictors = 3
Minimum internal node size5
Rows used2930

Response Information

Data SetN% of NMeanStDevMinimumQ1MedianQ3Maximum
Training204769.8617926680159.212789128500158900213000745000
Test88330.1418434479182.713100132000167240216000755000

Model Summary

Total predictors14
Important predictors14
StatisticsOut-of-BagTest
R-squared87.18%86.36%
Root mean squared error (RMSE)28688.443229225.1724
Mean squared error (MSE)8.23027E+088.54111E+08
Mean absolute deviation (MAD)18135.944518573.7900
Mean absolute percent error (MAPE)0.11240.1108

Save the training data

In the example above, we stored the identifiers for the training and test data. We want to use this same data to create the MLP model. Use the following steps to save a new worksheet with this data, or download the data from our saved worksheet.
  1. Choose Data > Sort.
  2. In Column, enter 'Sample_Id' and select Descending.
  3. In Columns to sort, select All columns.
  4. In Storage location for the sorted columns, select In a new worksheet.
  5. Select OK.