直线上有9个格子,有3个点,可能有10种分布方式
数量 | 编号 | |||||||||
7 | 0 | 1 | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 |
6 | 2 | 1 | 0 | 1 | 1 | 0 | 0 | 0 | 0 | 0 |
6 | 1 | 1 | 1 | 0 | 1 | 0 | 0 | 0 | 0 | 0 |
5 | 6 | 1 | 0 | 0 | 1 | 1 | 0 | 0 | 0 | 0 |
5 | 3 | 1 | 1 | 0 | 0 | 1 | 0 | 0 | 0 | 0 |
5 | 4 | 1 | 0 | 1 | 0 | 1 | 0 | 0 | 0 | 0 |
4 | 5 | 1 | 1 | 0 | 0 | 0 | 1 | 0 | 0 | 0 |
4 | 8 | 1 | 0 | 0 | 1 | 0 | 1 | 0 | 0 | 0 |
4 | 7 | 1 | 0 | 1 | 0 | 0 | 1 | 0 | 0 | 0 |
3 | 9 | 1 | 0 | 0 | 1 | 0 | 0 | 1 | 0 | 0 |
如第9种向右移
1 | 0 | 0 | 1 | 0 | 0 | 1 | 0 | 0 |
0 | 1 | 0 | 0 | 1 | 0 | 0 | 1 | 0 |
0 | 0 | 1 | 0 | 0 | 1 | 0 | 0 | 1 |
只有3种分布,因此9只有3个。而1,2的数量相同,3,6的数量相同,7,8的数量相同。顺序为0>1=2>3=6=4>5=7=8>9
(A,B)---1*n*2---(1,0)(0,1)
做一个网络让A就是这10个结构,B全是0.改变隐藏层节点的数量n,让n分别是6-230共18个值
230 | 210 | 190 | 170 | 150 | 130 | 110 | 90 | 70 |
50 | 30 | 20 | 16 | 15 | 12 | 10 | 8 | 6 |
实验做了两次,迭代次数由小到大的顺序为
1 | 2 | |||||||||||||||||||||
230 | 0 | 2 | 1 | 6 | 5 | 3 | 7 | 8 | 4 | 9 | 230 | 0 | 2 | 1 | 6 | 5 | 3 | 7 | 8 | 4 | 9 | |
210 | 0 | 2 | 1 | 6 | 5 | 3 | 7 | 8 | 4 | 9 | 210 | 0 | 2 | 1 | 6 | 5 | 3 | 7 | 8 | 4 | 9 | |
190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| 0 | 1 | 3 | 2 | 5 | 4 | 6 | 7 | 8 | 9 | |
12 | 0 | 1 | 2 | 3 | 4 | 6 | 5 | 7 | 8 | 9 | 12 | 0 | 1 | 3 | 2 | 5 | 4 | 6 | 7 | 9 | 8 | |
10 | 0 | 1 | 2 | 3 | 4 | 7 | 8 | 5 | 6 | 9 | 10 | 0 | 1 | 2 | 3 | 5 | 7 | 6 | 4 | 9 | 8 | |
8 | 1 | 0 | 3 | 4 | 2 | 7 | 6 | 5 | 8 | 9 | 8 | 0 | 3 | 1 | 4 | 2 | 5 | 6 | 8 | 7 | 9 | |
6 | 1 | 0 | 4 | 3 | 2 | 6 | 7 | 5 | 8 | 9 | 6 | 1 | 3 | 0 | 5 | 4 | 2 | 6 | 9 | 8 | 7 |
数据大致可以分成3部分
Ⅰ<20:混乱区,当n小于20的时候,两组数据彼此之间不一致,并且同组数据前后的顺序也不一致
Ⅱ20-150:稳定区,这一区域两组数据基本一致,同组数据前后也基本一致,并且两组数据的第50组与计算顺序完全一致
Ⅲ>150:稳定但不一致区,两组数据基本一致,但同组数据前后不一致
比较迭代次数
1 | ||||||||||
230 | 12672.9 | 19791.5 | 20484.6 | 22211.8 | 22536.7 | 22960 | 36613.7 | 36809.3 | 41526.2 | 44162.6 |
210 | 13986 | 23034.9 | 24263.2 | 24494.6 | 24867.8 | 24999.6 | 40412.2 | 40535.9 | 43552 | 45035.4 |
190 | 15535.8 | 26387 | 26875.2 | 26925.6 | 26998.4 | 27160 | 44006.1 | 44019 | 45227.1 | 45803.9 |
170 | 17345.2 | 28383.2 | 29091.8 | 29222.2 | 29401.4 | 29402.3 | 45583.6 | 45981.4 | 45986.7 | 46431.4 |
150 | 19522.6 | 29906.9 | 30162.7 | 31754.8 | 31796.4 | 31875.3 | 43445.3 | 45185 | 45210.9 | 46993.5 |
130 | 22155.9 | 31376.5 | 31458.5 | 33968.2 | 33987.1 | 34509.9 | 41973.2 | 44515.2 | 44583.7 | 47688.8 |
110 | 25361.3 | 33062.9 | 33316.1 | 36310 | 36325.6 | 37357 | 41359.5 | 44554.3 | 44618.4 | 48478.2 |
90 | 29348.5 | 35666.8 | 35855.8 | 38969.3 | 39195.8 | 40477.2 | 41911.3 | 45264.6 | 45664.6 | 49770.8 |
70 | 34664.1 | 39460.7 | 39571.5 | 42451.7 | 43115 | 44217.5 | 44227.9 | 47221.1 | 47980.3 | 51570.8 |
50 | 42145 | 45145.3 | 45622.9 | 47631.6 | 48779.6 | 48908.9 | 49534.7 | 51448.7 | 52243.2 | 55114.6 |
30 | 54512.2 | 56123.9 | 56823.3 | 57907.9 | 58942.7 | 59244.6 | 59273.3 | 60363.9 | 61586 | 63246.1 |
20 | 65886.6 | 68024.9 | 68893.7 | 69001.9 | 69710.4 | 70175.9 | 70373.8 | 71362 | 71906.1 | 73419.2 |
16 | 74323.9 | 75679.7 | 76507.1 | 76900.3 | 77138.7 | 78169.1 | 78791.4 | 78974 | 79255.2 | 80541.2 |
15 | 77275.5 | 78707.2 | 78950 | 79021.1 | 80108.3 | 80382.1 | 80439.2 | 82031.6 | 82151.4 | 82490 |
12 | 87423.4 | 88111.4 | 88906.5 | 88986.3 | 90121.2 | 90402.6 | 90979 | 91055.2 | 91566.2 | 92158.1 |
10 | 96940.8 | 97704 | 98700.9 | 99854.4 | 100459 | 100970 | 101158 | 101327 | 101349 | 102121 |
8 | 113533 | 113625 | 114304 | 114449 | 114706 | 114986 | 115246 | 115921 | 117296 | 118036 |
6 | 139103 | 140502 | 140959 | 141443 | 141530 | 141692 | 142086 | 142135 | 143018 | 144340 |
第Ⅰ区间的10条线密不可分,所以此时10个结构在Ⅰ区的占比不可分而混乱。当n=50,这10条曲线分布相对均匀,没有交叉也没有分叉,当n大约为80的时候曲线开始分叉,当n=170的时候,曲线甚至出现了两个交点,如果迭代次数反比于结构在搜索区域内的占比,当n=170时的搜索区域已经严重退化,不能很好的反应10个结构的差异。
所以从10个结构迭代次数顺序稳定性的角度比较,这个网络的最优隐藏层节点数在Ⅱ区50个左右。
比较第二组迭代次数
2 | ||||||||||
230 | 12663.7 | 19790.1 | 20491.2 | 22213.9 | 22564.5 | 22975.1 | 36608.9 | 36787.8 | 41550.9 | 44158.2 |
210 | 13983.6 | 23041.3 | 24247.7 | 24497.6 | 24881.3 | 24993 | 40425.1 | 40544.4 | 43577.5 | 45040.6 |
190 | 15538.4 | 26366.8 | 26898.1 | 26920 | 26985.9 | 27138.7 | 44021.9 | 44042 | 45191.1 | 45809.6 |
170 | 17365.7 | 28366 | 29085.4 | 29230.2 | 29398.2 | 29446.4 | 45604.9 | 45991.7 | 45996.9 | 46435.7 |
150 | 19535.3 | 29916 | 30123.5 | 31743.7 | 31774.5 | 31883.7 | 43430.7 | 45171.8 | 45217.4 | 47035.9 |
130 | 22136.5 | 31370.9 | 31425.2 | 33959.7 | 33988.4 | 34574.5 | 41956.4 | 44578.3 | 44584.6 | 47642.7 |
110 | 25322 | 33039 | 33316.6 | 36316.6 | 36321.3 | 37324.7 | 41339.4 | 44470.9 | 44658.2 | 48536.7 |
90 | 29369.9 | 35640.3 | 35818.3 | 38894.6 | 39181.9 | 40539.9 | 42011.5 | 45249.2 | 45622.9 | 49640.9 |
70 | 34680 | 39515.9 | 39535.4 | 42367.4 | 43141.5 | 44198.1 | 44327 | 47252.9 | 47846.5 | 51673.2 |
50 | 42165.1 | 45365.4 | 45610.7 | 47707.1 | 48786.8 | 48964.2 | 49425.7 | 51531 | 52249.9 | 55260.8 |
30 | 54420.7 | 56338.7 | 56790.3 | 57904.1 | 58774.7 | 59042.2 | 59462.3 | 60635.9 | 61298.8 | 63524.3 |
20 | 66826 | 67670.6 | 68228.4 | 68600.5 | 69932.6 | 69937.6 | 70364.1 | 70719.7 | 71672.9 | 73006.5 |
16 | 74647.8 | 75712.3 | 76509.2 | 76855.7 | 77846.7 | 78271.6 | 78303.3 | 78439.7 | 79359.9 | 80205.5 |
15 | 77203.1 | 78044.7 | 78741.1 | 79134.4 | 79592.5 | 79919.6 | 80141.6 | 81078.3 | 81634.7 | 82683.6 |
12 | 87348.5 | 88796.7 | 88954.1 | 89090.8 | 89446.2 | 89957.2 | 90675.5 | 91096.4 | 91903.5 | 92015.3 |
10 | 97693 | 98761.1 | 99346.2 | 99442.3 | 100268 | 100497 | 100951 | 101442 | 101808 | 102037 |
8 | 112994 | 114496 | 114599 | 115162 | 115471 | 115923 | 116186 | 116769 | 117226 | 118174 |
6 | 140075 | 140176 | 140225 | 141598 | 141794 | 141808 | 142303 | 143649 | 144111 | 144284 |
两组曲线很相近,所以随着隐藏层节点数的增加网络的搜索区域逐渐形成,当n=50个左右达到性能最佳,当n=80时,搜索区域开始退化,当n=170的时候出现交点,顺序再次变混乱。