top of page

How to use Neural Network Toolbox in MATLAB

How to use Neural Network Toolbox in MATLAB

Introduction to Neural Network Toolbox

In MATLAB, the Neural Network Toolbox can be utilized for various applications, including input-output fitting, pattern recognition, classification, clustering, and dynamic time series analysis. For this demonstration, we'll concentrate on the input-output fitting model.

Configuring the Neural Network:

  • In the fitting app, input the years as the input variable and the population as the target variable.

  • Click "Next" and configure the network by choosing the number of neurons in the hidden layer. The default is 10, but this can be adjusted based on the complexity of the data.

  • Proceed to select the training algorithm. We'll use the Levenberg-Marquardt (LM) algorithm for this example.

  1. Training the Neural Network:

  • After configuring the network, click "Train". The toolbox will use the provided data to train the neural network.

  • Upon training, you'll see metrics like Mean Squared Error (MSE) and the regression (R) value. An R value close to 1 indicates a well-trained model.

  1. Evaluating the Model:

  • The trained network can now be used for population prediction. For instance, you can input the year 2020 and the network will predict the population for that year.


Using the Neural Network Toolbox in MATLAB for population prediction involves preparing a good dataset, configuring and training the network, and evaluating its performance. By continuously improving the data quality and network parameters, you can achieve more accurate predictions.

20 views0 comments


bottom of page