Purpose
This App provides a tool for fitting data with neural network. It trains a neural network to map between a set of inputs and output. You can use it to predict response of independent variables.
Installation
The app requires R software (recommended version 4.4.1) and package (neuralnet).
- Open the download page for R version 4.4.1
- Download the file named R-4.4.1-win.exe and install it
- Once you have successfully installed R, you can then install the App
- The App will download and install required R packages when you run it the first time.
Note that if you installed the App prior to instalilng R, the App icon will show in the Apps bar.
Simply click on that icon to continue after you have installed R.
Note: If downloading packages fails, a pop-up dialog will ask you to copy 2 lines of commands from Results Log and run them in R to complete downloading packages.
Related FAQ: FAQ-1214 What can I do when Origin has trouble launching R?
Operation
- Activate a worksheet or a graph. Click the App icon to bring up the dialog.
- On Input Data tab, select single or multiple datasets for Independent Variables and specify Dependent Variable by selecting a single dataset.
- On Options tab, change settings to fit a neural network.
- Number of Layers: Number of layers between input and output.
- Number of Hidden Neurons in Each Layer: Specify space-separated list of number of hidden neurons. For example, if the 1st layer contains 3 neurons and 2nd layer contains 2 neurons, enter '3 2'.
- Training Repetitions: The number of repetitions for the neural network’s training. The one with the minimum error is reported.
- Neural Network Algorithm: Algorithm to calculate the neural network weights.
- Error Function: Function to minimize in search for the optimum weights. Also called cost function.
- Threshold of Error Function: A numeric value specifying the threshold for the partial derivatives of the error function as stopping criteria.
- Activation Function: Function that is used for smoothing the result.
- K-fold Cross Validation: The data sample is split into K groups. For each unique group, take the group as a test data set. Take the remaining groups as a training data set. Fit a model on the training set and evaluate it on the test set.
- Print Progress Messages: Print threshold value at each iteration step.
- On Quantities and Plots tab, choose which quantities and plots to output.
(Notes: Network Plot is NOT available for Origin version earlier than 2021b.)
- On Prediction tab, you can select a range of independent data to predict the response with the fitted neural network.
- Click OK to output reports.
Note: If neural network fitting fails, it may be because the neural network is too complex or the threshold of error function is too low. Try to use fewer layers and neurons or increase the threshold.
Sample OPJU File
This app provides a sample OPJU file. Right click the App icon in the Apps Gallery window, and choose Show Samples Folder from the short-cut menu. A folder will open. Drag-and-drop the project file Neural Network Fitting Sample.opju from the folder onto Origin. The Notes window in the project shows detailed steps.
Note: If you wish to save the OPJU after changing, it is recommended that you save to a different folder location (e.g. User Files Folder).