Purpose
This App provides a tool for fitting data with neural network backpropagation. It trains a neural network to map between a set of inputs and output. You can use it to predict response of independent variables.
Notes:
-
It needs Embedded Python and scikit-learn library. Other dependent libraries include joblib, threadpoolctl, numpy and scipy.
-
This App uses backpropagation algorithm, which is different from that of Neural Network Fitting App (RPROP and GRPROP algorithm). The regression results of the two Apps could differ from each other in some cases.
Installation
- Download the NNR.opx file, then drag-and-drop onto the Origin workspace.
- The App will start downloading dependent Python libraries. Wait a few minutes until the download is completed and restart Origin.
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 Hidden Neurons in Each Layer: Specify space-separated list of number of hidden neurons. For example, if you have 3 layers and each layer contains 3,5 and 4 neurons, enter Ð 5 4'.
- Maximum Iterations: Maximum number of iterations. The solver iterates until convergence or this number of iterations.
- Learning Rate: Learning rate schedule for weight updates.
- Loss Tolerance: Tolerance for the optimization.
- Maximum Number of Epochs without Change: Maximum number of epochs to not meet Loss Tolerance improvement. When the loss is not improving by at least Loss Tolerance for iterations defined by this option, convergence is considered to be reached and training stops.
- Activation Function: Activation function for the hidden layer.
- 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.
- Standardize Independent Variables:(a) None: Variables are not standardized. (b) Z scores (standardize to N(0, 1)):Variables are transformed to the standard normal distribution. (c) Normalize to (0, 1):Variable are transformed to the range of 0 and 1.
- Print Progress Messages: Print progress messages from the packages.
- On Quantities and Plots tab, choose which quantities and plots to output.
- 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.
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 Regression 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).
The sample opju file contains an example showing how to predict using saved neural network model. When you get satisfactory model, it is saved with the report workbook. You can use the model to predict from X data with Python(the sample file includes an example). Starting from Origin 2023, the App adds a Predict button to the report sheet. You can click it to open a dialog to select data you want to predict directly with the neural network model.