How to customize performance function in MATLAB neural network.

4 ビュー (過去 30 日間)
Chibuzo Nnonyelu
Chibuzo Nnonyelu 2015 年 4 月 22 日
コメント済み: Chibuzo Nnonyelu 2018 年 1 月 14 日
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
Arygianni Valentino 2017 年 12 月 1 日
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 Center および File ExchangeSequence 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