how to solve this problem using neural network?
7 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
H.misaq
el 4 de Jun. de 2017
Comentada: Greg Heath
el 17 de Jun. de 2017
Hi I'm pretty new to Matlab but it seems easy to understand Matlab language and I've some skills in programming like Basic.
first I need to create a simple neural network program that can be trained, so it can get some input of:
[age(years), weight(kg), height(cm)] and decide how much this person fit to be an athlete from 1 to 10. for example:
[20, 70, 180] = 10 % OK
[85, 95, 170] = 1 % Not OK
where should I begin from? how much input, hidden and output neuron do I need?
0 comentarios
Respuesta aceptada
Greg Heath
el 5 de Jun. de 2017
For N pairs of I-dimensional "I"nputs and corresponding
O-dimensional "O"utput target outputs, the matrices must
have the dimensions
[ I N ] = size(input)
[ O N ] = size(target) % = size(output)
Then
Ntrn = N -2*round(0.15*N) % default No of training vectors
Ntrneq = Ntrn*O % default No of training equations
For an I-H-O network the number of unknown weights is
Nw = (I+1)*H + (H+1)*O = O + (I+O+1)*H
Therefore, the number of training equations is greater or equal to the number of unknowns when H, the number of hidden nodes satisfies
Ntrneq >= Nw ==> H <= Hub
where the hidden node upper bound, Hub, is given by
Hub = (Ntrn-1)*O/(I+O+1)
When H > Hub, the net is OVERFIT and there is a danger of OVERTRAINING the overfit net and losing the ability to generalize performance beyond the training samples.
The best ways to avoid overtraining an overfit net are
1. Do not overfit by using H <= Hub
2. THE MATLAB DEFAULT:
a. H = 10
b. Use VALIDATION STOPPING, which stops training when
the validation subset error increases for more than 6
(The MATLAB default ) continuous epochs.
3. BAYESIAN REGULARIZATION: Use the training function
TRAINBR which uses a penalized training goal
SSE + const * sum(unknown weights) to penalize the number
and size of unknown weights.
Your problem will probably be best solved as a classification problem using PATTERNNET with a one dimensional target that is either 0 or 1.
1. See the documentation
help patternnet
and
doc patternnet
2. See some of my examples by searching BOTH the NEWSGROUP and ANSWERS with
greg patternnet
Hope this helps.
Thank you for formerly accepting my answer
Greg
2 comentarios
Greg Heath
el 17 de Jun. de 2017
There is nothing simpler than to read and try the examples in the help and doc documentation.
help patternnet
doc patternnet
Next try searching in both the NEWSGROUP and ANSWERS for posted questions and answers. The magic search word is
PATTERNNET
however, YOU CAN REDUCE THE NUMBER OF POSTS BY USING
GREG PATTERNNET
Hope this helps,
Greg
Más respuestas (0)
Ver también
Categorías
Más información sobre Matrix Indexing en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!