How to customize performance function in MATLAB neural network.

4 次查看(过去 30 天)
Greetings. I am relatively a beginner in neural network. I started off using MATLAB neural network tool until I was met with some limitations. My problem is as follows: 1.) I would like to be able to customize my performance function such that I don't use the inbuilt performance functions such as mse, mae, etc. 2.) I would also like to be able to modify how many training iteration before any validation. I read somewhere that it takes five (5) training iteration before every consecutive validation check. However, if someone has an idea of a better neural network tool that is good for function approximation using MLP, please recommend.
Thank you.

回答(1 个)

Greg Heath
Greg Heath 2015-4-22
1. Start with a copy of mse (or other performance function)
a. Enter the command: type mse
b. Copy and save the result under a different name, e.g., myperf
c. Modify it
d. Save it
e. Change the net property
net.perfornFcn = myperf;
f. Test it.
2. net.trainParam.max_fail = 10; %(or whatever)
3. Enter WITHOUT THE SEMICOLON!
net = fitnet
You will see a long list of default parameters that can be changed to your liking.
Hope this helps.
Thank you for formally accepting my answer
Greg
PS: This is explained in the website documentation section on custom functions.
  3 个评论
Arygianni Valentino
Hi Greg..
If you do not mind, would you explain more and give an example of the step Modify the performance function? Since I got stuck there. I could not find the formula where the corresponding performance function does the calculation.
Chibuzo Nnonyelu
Chibuzo Nnonyelu 2018-1-14
This approach did not actually work. I ended up writing my own MLP BP from scratch using C#. C# ensured faster training with larger data. And I was able to try my custom error and performance function.
Using MATLAB for ANN is only good if you are just fine with its available functions and all.

请先登录,再进行评论。

类别

Help CenterFile Exchange 中查找有关 Sequence and Numeric Feature Data Workflows 的更多信息

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by