I have some input variables and corresponding output variable but now how can I get neural network mathematical expression after I have done my modeling by nntool in Matlab 2015 using those input and output parameters?
Assuming that net is the network variable name, type net in Matlab command and you will see a listing of the network objects parameters. For example number of layers, and others. weight and bias values are reported as (this is an example):
IW: {2x1 cell} containing 1 input weight matrix
LW: {2x2 cell} containing 1 layer weight matrix
b: {2x1 cell} containing 2 bias vectors
type wb = getwb(net) to get the network weight and bias values as single vector.
If you type in "net.IW" or "net.LW" or "net.b" it will give you the cell structures for the input weights, layer weights, and biases, respectively.
To get the values, you need to type:
net.IW{1,1}
net.LW{2,1}
net.b{1,1}
and similar commands, depending on the structure of IW, LW, b
With the above information, you can have the full mathematical description of your network.
Assuming that net is the network variable name, type net in Matlab command and you will see a listing of the network objects parameters. For example number of layers, and others. weight and bias values are reported as (this is an example):
IW: {2x1 cell} containing 1 input weight matrix
LW: {2x2 cell} containing 1 layer weight matrix
b: {2x1 cell} containing 2 bias vectors
type wb = getwb(net) to get the network weight and bias values as single vector.
If you type in "net.IW" or "net.LW" or "net.b" it will give you the cell structures for the input weights, layer weights, and biases, respectively.
To get the values, you need to type:
net.IW{1,1}
net.LW{2,1}
net.b{1,1}
and similar commands, depending on the structure of IW, LW, b
With the above information, you can have the full mathematical description of your network.
If I understand your question correctly, you have a data (in and out) and you used ANN Toolbox to build the the ANN-Based Model. After that, you want to have a mathematical representation of the model. If this is the case, I suggest that you consult any of the good references on the mathematical foundations of ANN such as (Neural Networks) by Haykin and limit the mathematical expressions to match with your in and out parameters.
Thank both of you for giving me an idea about this, but actually, I have already built my ANN and get the optimum prediction values as my results but the problem is that I want to use the results got from the ANN in my GA model to get the optimized input parameters also for the optimized output responses, for this I need to make a fitness function for the GA model, how can I get such a function from the ANN which I could use in my GA model? Or is there any other way to integrate the GA in my ANN model? If so please help me to solve the problem. I am using Matlab 7.10.0 (2010b) version for my work, is there any such opportunity to use GA directly in ANN model for optimization? As I am new in this work so any help corresponding the problem will be highly appreciated.
Using ANN to find a equation, then optimizing for a GA model be difficult. Because you just get a form of matrix of equation from ANN, so you can't optimize with this equation. I don't know what is the main purpose you want to optimize, but ANN is a optimal tool very effective