File Exchange > Data Analysis >    Neural Network Regression

Author:
OriginLab Technical Support
Date Added:
7/28/2020
Last Update:
10/10/2024
Downloads (90 Days):
656
Total Ratings:
5
File Size:
945 KB
Average Rating:
File Name:
NNR.opx
File Version:
1.42
Minimum Versions:
License:
Free
Type:
App
Summary:

Perform neural network fitting using Python.

Screen Shot and Video:
Description:

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

  1. Download the NNR.opx file, then drag-and-drop onto the Origin workspace.
  2. The App will start downloading dependent Python libraries. Wait a few minutes until the download is completed and restart Origin.

Operation

  1. Activate a worksheet or a graph. Click the App icon to bring up the dialog.
  2. On Input Data tab, select single or multiple datasets for Independent Variables and specify Dependent Variable by selecting a single dataset.
  3. 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 3,5 and 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.
  4. On Quantities and Plots tab, choose which quantities and plots to output.
  5. On Prediction tab, you can select a range of independent data to predict the response with the fitted neural network.
  6. 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.

Updates:

v1.42:10/10/2024 Update sample file.
v1.41: 7/7/2023 Support loss curve plot.
v1.4:2/24/2023 Delete python cache file before uninstallation.
v1.39: 9/20/2022 Add button on report sheet to predict data with saved model (after Origin 2023).
v1.33: 8/17/2022 Support standardizing data to predict in python.
v1.32: 8/5/2022 Support using saved neural network model to predict data in python.
v1.25: Add Print Progress Messages option.
v1.1: Add Standardize Independent Variables option.

Reviews and Comments:
08/28/2024  

08/07/2024MengXZThanks for this convenience tool. However, what type of LOSS function is applied should be clarified.

03/20/202415310611956Apps(structural equation model)

03/16/2021OriginLabHi,
Prediction is a very complicated process far more than linear fitting. We don’t support it right now.

03/16/2021kbrandenburgWorks well. A more detailed discussion of parameter settings would be nice. I would also like to see added a way to export the trained network in a format that can be inserted in the user's code and/or used as a prediction tool separate from the training algorithm. In the mean time, if anybody has any thoughts on a way to achieve this right now, please share.