Newff vs patternet in my program

4 views (last 30 days)
I have written a code , the purpose of the code is classification of EEG datasets related to emotion, I have used both newff and patternet , I have always thought there is no difference between them except for the training function they use , but the thing is there are tremendous changes between the results; for example some times when I use same number of neurons for my network hidden layer, using newff leads to some results while using patternet may lead to no result , it seems net is not working or the result will lead to a very big error. I wonder why is that for. more over I assume in new version of net codes I mean patternet for example there are some ways that prevent overfitting happens even we set net.divideParam.valRatio=0 , it seems there are some hidden strategies that keep net from overfitting. I would really appreciate it if some one helps me to figure these differences out.

Accepted Answer

Greg Heath
Greg Heath on 23 Nov 2015
You are very confused. The current MLP functions are
-FITNET for regression and curve-fitting
-PATTERNNET for classification and pattern-recognition
-FEEDFORWARDNET a generic net called by FITNET and
PATTERNNET
They replace the obsolete but still available functions
-NEWFIT for regression and curve-fitting
-NEWPR for classification and pattern-recognition
-NEWFF a generic net called by NEWFIT and NEWPR
PATTERNNET and NEWFF are not even remotely similar.
To obtain the documentation for PATTERNNET try
help patternnet
doc patternnet
type patternnet
I have posts which explain the differences between the three current functions as well as for the three obsolete functions.
The coding for current and obsolete functions is not similar. Don't waste your time trying to compare them.
Hope this helps.
Thank you for formally accepting my answer
Greg
  5 Comments
Greg Heath
Greg Heath on 25 Nov 2015
>I have read what you said in some of posts about differences between Newff and feedforwardnet , my question is in my EEG classification problem, why while newff and newpr can lead to some result, a net with same structure which is written by feedforward or patternet cannot lead to a result!
I have no idea where you got that idea. All are universal approximators and, given a good choice of random initial weights the current functions should not be inferior.
It is simple:
If you have the current versions use fitnet for regression/curve-fitting and patternnet for classification/pattern-recognition. I cannot think of a good reason for using feedforward instead.
Otherwise
Use newfit for regression/curve-fitting and newpr for classification/pattern-recognition. I cannot think of a good reason for using newff instead.
Overfitting is something that YOU do, not a program. Given a set of training data, the net will be overfit if YOU use too many hidden nodes.
If the net is overfit, I have given you 5 ways to prevent overtraining the overfit net and degrading it's inability to generalize to nontraining data.
Validation-Stopping is a default in all 4 functions. The other methods You will have to implement.
Hope this is clear.
Greg
Fereshteh....
Fereshteh.... on 28 Nov 2015
thank you very much Greg for your answer :) I hope my questions didn't make you angry :D it seems they did actually .

Sign in to comment.

More Answers (0)

Community Treasure Hunt

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

Start Hunting!