Training set and target set and output in Matlab neural network
2 views (last 30 days)
Show older comments
let us say i have a data set
patients arrt1 attr2 attr3 disease
1 present not present heavily present yes
2 not present present heavily present yes
3. present present heavily present yes
4 not present present present no
So here disease attribute is the decision attribute.I am willing to detect such kind of disease for lets say 1000 patients. So my first question is what actually should the training set(dot mat format) contain and also what will be the target set(dot mat format). What will be the out put format.
please reply as early as possible.
0 Comments
Accepted Answer
Greg Heath
on 19 Sep 2013
Since not-present, present and heavily-present are interpreted as having an increasing order, you can represent them as ordered integers. examples [-1 0 1 ], [0 1 2 ] or [ 1 2 3]. The obvious choice for disease is [ 0 1 ].
Hope this helps.
Thank you for formally accepting my answer
Greg
P.S. See the comp.ai.neural-nets FAQ
0 Comments
More Answers (2)
Greg Heath
on 3 Nov 2013
patients arrt1 attr2 attr3 disease
1 present not present heavily present yes
2 not present present heavily present yes
3 present present heavily present yes
4 not present present present no
1 1 0 2 1
2 0 1 2 1
3 1 1 2 1
4 0 1 1 0
Your training data set should cover all I/O possibilities
Are there 3^3 = 27 input possibilities or 3*2^2 = 12 ?
Can the same input have different outputs? i.e., can two people have the same input attributes but one is diseased and the other is not?
For the above 4 patients, the MATLAB format is
x = [ 1 0 1 0 ; 0 1 1 1 ; 2 2 2 1]
x = [ 1 0 1 0
0 1 1 1
2 2 2 1 ]
t = [ 1 1 1 0 ]
I'm not familiar with excel. However, whatever convention you use there, it should convert to the form I have illustrated ( or one that is equivalent).
2 Comments
Greg Heath
on 5 Nov 2013
You are mixing Apples and Oranges. This is a classification or pattern recognition problem which is handled by PATTERNNET instead of FITNET or FEEDFORWARDNET which are typically used for regression and curvefitting. Instead of the regression or curvefitting plots that you have obtained, you want the classification confusion matrix and ROC curves that are PATTERNNET defaults.
My last post was a lengthy one regarding classification
Some of the info shouldl be useful to you.
See Also
Categories
Find more on Classification 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!