Purpose
This app can train and apply random forest models for predictive analysis.
Installation
Download the file Random_Forest.opx, and then drag-and-drop onto the Origin workspace. The app icon will appear in the Apps Gallery window.
Operation
Click the Random Forest icon in the Apps Gallery and select either Classification or Regression. The dialog will open with the following tabs:
1. Input Tab
- Response: Specify the response (target) variable. For classification, it should be categorical data; For regression, it should be numeric data.
- Predictors: Specify the input variables used to model the response.
2. Model Tab
- Method to Split Node: Specify the function to measure the quality of a split.
- Number of Trees: Specify the number of trees.
- Maximum Depth of Tree: Specify the maximum depth of the tree.
- Number of Features Sampled per Split: Specify the number of features considered when splitting nodes.
- Minimum Samples to Split: Specify the minimum number of samples required to split an internal node.
- Minimum Samples in Leaf: Specify the minimum number of samples allowed in a leaf node
- Use Bootstrap Sampling: Specify whether to use bootstrap samples to build trees.
- Use Out of Bag Samples: Specify whether to use out-of-bag samples to estimate the generalization score.
- Random Seed: Controls the randomness of both bootstrapping and feature sampling when searching for the best split.
- Weight: Specify weights for each response sample. If not specified, all samples are assigned a weight of 1.
3. Prediction Tab
- Predictors: Specify the data for prediction. The data should have the same structure as the training predictors.
- Predicted Result: Specify where to output the results.
4. Plots Tab
This tab is used to specify which plots will be output.
5. Output Tab
- Report: Specify where to output the report table.
- Plot Data: Specify where to output the plot data.
Sample OPJU File
This app includes a sample OPJU file. Right-click the Random Forest icon in the Apps Gallery window and choose Show Samples Folder from the context menu. Then drag and drop Random Forest Sample.opju into Origin. The project file contains sample data and a tutorial. If you modify the OPJU and want to save it, save it to a different folder, such as the User Files Folder.
BIBLIOGRAPHY
- Scikit-learn developers. (n.d.). RandomForestClassifier. https://scikit-learn.org/stable/modules/generated/sklearn.ensemble.RandomForestClassifier.html
- Scikit-learn developers. (n.d.). RandomForestRegressor. https://scikit-learn.org/stable/modules/generated/sklearn.ensemble.RandomForestRegressor.html