How to write neural networks in form of a function???
1 view (last 30 days)
Show older comments
I want to use the ann function for optimization using genetic algorithm.. Thanks in advance
0 Comments
Accepted Answer
Greg Heath
on 7 Apr 2014
h = tanh(b1 + IW*x);
y = b2 + LW*h;
2 Comments
Greg Heath
on 11 Apr 2014
I cannot help with code I cannot see.
I apologize for not being a mind reader.
More Answers (1)
Greg Heath
on 19 Feb 2015
It is more efficient to have bipolar inputs, tansig hidden nodes and purelin outputs. Bipolar inputs and outputs can be obtained using ZSCORE, MAPMINMAX and/or MAPSTD. Since the corresponding equations are relatively straightforward, the following equations are for normalized quantities:
[ I N ] = size(xn)
[ O N ] = size(tn)
[ O N ] = size(yn)
[ H N ] = size(h)
[ H 1 ] = size(B1)
[ H I ] = size(IW)
[ O 1 ] = size(B2)
[ O H ] = size(LW)
h = B1 + tanh( B1 + IW * xn );
yn = B2 + LW * h;
Hope this helps.
Greg
0 Comments
See Also
Categories
Find more on Define Shallow Neural Network Architectures in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!