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.
The app requires R software and package (neuralnet).
- Install R or upgrade it before installing the App (Minimum required version 3.4.1. Please download R from here.).
- Download the neuralnetfit.opx file, then drag-and-drop onto the Origin workspace.
- The App will start downloading dependent R packages automatically. Wait a few minutes until the download is completed.
Note: If auto download fails, a pop-up dialog will ask you to copy 2 lines of commands from Results Log and run them in R to complete package download.
If you reinstall or upgrade R after installing the app, it would not work properly. Please reinstall the app.
- 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.
- 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.
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).