フィルターのクリア

How do I know the number of the hidden nodes in ANN ?

3 ビュー (過去 30 日間)
farzad
farzad 2015 年 3 月 7 日
コメント済み: Greg Heath 2018 年 8 月 16 日
Hi All
having an ANN network , in I inputs and O outputs, how do we know the number of hidden nodes? is it related to the number of hidden layers ?
when designing an I H O topology , when you set the Hmax and Hmin and dH , you can change the number of trials by changing any of the Hmin , Hmax or even dH
what is the main rule ? and advised relation between dH and Hmin ? should they be specific numbers ?
In NO book it is discussed .

採用された回答

Greg Heath
Greg Heath 2015 年 3 月 10 日
編集済み: Andrei Bobrov 2015 年 3 月 11 日
[I N ] = size(input) % size("I"nput)
[O N ] = size(target) % size("O"utput)
Ntrn = N - 2*round(0.15*N) % Default no. of training examples ~ 0.7*N
Ntrneq = Ntrn*O % No. of training equations
Nw = (I+1)*H +(H+1)*O % No. of unknown weights for H = number of hidden nodes
Overfitting ( Nw > Ntrneq ) allows decreased performance on nontraining (e.g., val, test and unseen) data
Since H > ( Ntrneq -O )/(I+O+1) for overfitting, one training strategy is H <= Hub or preferably, H << Hub where
Hub = -1 + ceil( (Ntrneq - O) / (I+O+1) ) % integer H
My training strategy:
Minimize the number of hidden nodes subject to the constraint that the mean-square-error is less than 1 percent of the mean target variance
net.trainPerform.goal = 0.01*mean(var(target',1)))
Very often this is accomplished by trial and error subject to
0 <= Hmin <= H <= Hmax <= Hub
However, sometimes it is necessary to exceed Hub. The mitigation for this is
Validation Stopping and/or regularization (e.g., msereg or TRAINBR}
Hope this helps.
Thank you for formally accepting my answer
Greg
  9 件のコメント
farzad
farzad 2015 年 3 月 14 日
When I set the H = 1 , the Nw = 15 , but when I check it with :
net.numWeightElements
it was = 159
so changing H , has no direct effect on the actual number of hidden layers
Greg Heath
Greg Heath 2018 年 8 月 16 日
One hidden layer is ALWAYS sufficient.
My equations assume no more than 1 hidden layer.
Greg

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

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