第四章、 實驗
4.1 實驗 A
4.1.3 實驗結果
z Two-Peak Trap:從實驗結果來看,在 Two-Peak Trap 之中,本論文所提 出的迴歸引擎的確可以很順利的找到迴歸公式,而且即使有雜訊的存在 也不會受到雜訊的影響。
z Central Two-Peak Trap:Central Two-Peak Trap 和 Two-Peak Trap 的結果 一樣,迴歸引擎都可以找出非常合適的迴歸公式。不過由於問題較 Two-Peak Trap 來的複雜,因此我們在轉折的地方開始有較明顯的誤差,
但是這誤差還在合理的範圍之內。
z Five Uneven-Peak Trap:在 Five Uneven-Peak Trap 之中,迴歸引擎可以 找出趨進的迴歸公式,但是在轉折的部份誤差較為前兩個實驗大。
z Equal Maxima:從實驗的結果來看,迴歸引擎可以找到相似的迴歸公 式。但是同樣的在轉折的細節部份,所得到的誤差會比較大。
z Uneven Maxima:Uneven Maxima 和 Equal Maxima 的結果相似。最大值 的間隔不同並不會影響迴歸引擎所找出的迴歸公式。不過相同的,在轉 折的部份誤差都會較大。
z Decreasing Maxima:迴歸公式大致上符合原始資料,但是在第四、第五 個最大值的部分有較大的誤差,這是因為小波迴歸在尋找趨勢的時候是 每一個層級選三個最好的係數,剛好挑到的前三個係數剛好是前三個最 大值,而基因規劃演化的時候又陷入區域最佳解無法找到更好的結果,
因此第四和第五個結果就比較不理想。在雜訊10%和 20%的時候,第四 和第五個誤差就較小,便是因為演化過程的時候跳出了區域最佳解。
z Uneven Decreasing Maxima:在 Uneven Decreasing Maxima 之中所找的 迴歸公式在第四和第五個最大值的部份誤差並不大,除了雜訊10%的實 驗的第四個最大值有比較大的誤差之外,其他的三個實驗結果誤差都並
不高。從此實驗和Decreasing Maxima 相較,更可以確定小波迴歸所計 算出的資料趨勢會影響基因規劃尋找的結果。
z Doppler:Doppler 的實驗之中在前段的部份迴歸公式有較高的誤差。仔 細觀察原始資料我們可以發現在前段的部分資料介於-0.05~0.05 之中,
因此迴歸公式找出來趨近0 的公式也只有 0.05 的誤差,因此迴歸引擎又 陷入了區域最佳解的問題之中。
z Exponential Line:Exponential Line 的結果之中我們可以看到,一樣在轉 折的部份迴歸公式的誤差較大。在 5%雜訊之中的結果較不理想,但在 其他的實驗資料之中誤差並不像 5%雜訊的資料大,因此我們可以推斷 在5%雜訊的實驗之中,迴歸引擎又陷入了區域最佳解的問題。
Two-Peak Trap
0
Two-Peak Trap with Noise 5%
-50
Two-Peak Trap with Noise 10%
-50
Two-Peak Trap with Noise 20%
-50
Central Two-Peak Trap
0 200 400 600 800 1000 1200
Y f(x)
Central Two-Peak Trap 5%
-50
0 200 400 600 800 1000 1200
Y f(x)
(a) Central Two-Peak Trap 的迴歸結果 (b) 5%雜訊的迴歸結果
Central Two-Peak Trap 10%
-50
0 200 400 600 800 1000 1200
Y f(x)
Central Two-Peak Trap 20%
-50
0 200 400 600 800 1000 1200
Y f(x)
(c) 10%雜訊的迴歸結果 (d) 20%雜訊的迴歸結果
圖 4.1-11 Central-Two Peak 的迴歸結果
Five Uneven-Peak Trap
0
Five Uneven-Peak Trap with Noises 5%
-50
0 200 400 600 800 1000 1200
Y f(x)
(a) Five Uneven-Peak Trap 的迴歸結果 (b) 5%雜訊的迴歸結果
Five Uneven-Peak Trap with Noises 10%
-50
0 200 400 600 800 1000 1200
Y f(x)
Five Uneven-Peak Trap with Noises 20%
-50
0 200 400 600 800 1000 1200
Y f(x)
(c) 10%雜訊的迴歸結果 (d) 20%雜訊的迴歸結果
圖 4.1-12 Five Uneven-Peak Trap 的迴歸結果
Equal Mixma
Equal Mixma with Noises 5%
-0.2
Equal Mixma with Noises 10%
-0.2
Equal Mixma with Noises 20%
-0.2
Uneven Maxima
-0.2
0 200 400 600 800 1000 1200 1400
Y f(x)
Uneven Maxima with Noises 5%
-0.2
0 200 400 600 800 1000 1200 1400
Y f(x)
(a) Uneven Maxima 的迴歸結果 (b) 5%雜訊的迴歸結果
Uneven Maxima with Noises 10%
-0.2
0 200 400 600 800 1000 1200 1400
Y
0 200 400 600 800 1000 1200 1400
Y f(x)
(c) 10%雜訊的迴歸結果 (d) 20%雜訊的迴歸結果
Decreasing Maxima
0 200 400 600 800 1000 1200 1400
Y f(x)
Decreasing Maxima with Noises 5%
-0.2
0 200 400 600 800 1000 1200 1400
Y f(x)
(a) Decreasing Maxima 的迴歸結果 (b) 5%雜訊的迴歸結果
Decreasing Maxima with Noises 10%
-0.2
0 200 400 600 800 1000 1200 1400
Y f(x)
Decreasing Maxima with Noises 20%
-0.4
0 200 400 600 800 1000 1200 1400
Y f(x)
(c) 10%雜訊的迴歸結果 (d) 20%雜訊的迴歸結果
圖 4.1-15 Decreasing Maxima 的迴歸結果
Uneven Decreasing Maxima
-0.2
0 500 1000 1500 2000
Y f(x)
Uneven Decreasing Maxima with Noises 5%
-0.2
0 500 1000 1500 2000
Y f(x)
(a) Uneven Decreasing Maxima 的迴歸結果 (b)加上 5%雜訊的迴歸結果
Uneven Decreasing Maxima with Noises 10%
-0.2
0 500 1000 1500 2000
Y f(x)
Uneven Decreasing Maxima with Noises 20%
-0.4
0 500 1000 1500 2000
Y f(x)
(c)加上 10%雜訊的迴歸結果 (d)加上 20%雜訊的迴歸結果 圖 4.1-16 Uneven Decreasing Maxima 的迴歸結果
Doppler
Doppler with Noises 5%
-0.15
Doppler with Noises 10%
-0.15
Doppler with Noises 20%
-0.2
Exponential Line
0
Exponential Line with Noises 5%
0
(a) Exponential Line 的迴歸結果 (b) Exponential Line 加上 5%雜訊的迴歸結果
Exponential Line with Noises 10%
0
Exponential Line with Noises 20%
0
(c) Exponential Line 加上 10%雜訊的迴歸結果 (d) Exponential Line 加上 20%雜訊的迴歸結果
從實驗結果來看,符號式迴歸引擎的確可以得到相近的迴歸公式。在 Five-Uneven-Peak Trap、Tow-Peak Trap、Central Two-Peak Trap 和 Exponential Line 的實驗之中,迴歸公式和原始資料之間的誤差都非常低,即使是在轉折的 陷阱部分都不會有太大的誤差。在Decreasing Maxima 的實驗之中,第四和第 五個最大值的波峰有些誤差,這是因為在小波迴歸的時候僅選擇最好的三個小 波係數,所以導致第四和第五的波峰誤差變大。而在Doppler 的實驗之中,由 於前面的波形頻率較高且震幅較小,因此導致迴歸公式找出的趨勢是以平均值 為0 做為標準。
接下來我們比較了加上WR 的 SRGP 迴歸引擎和沒加上 WR 的 SRGP 迴 歸引擎以及線性迴歸的方式的平均絕對誤差(Mean Absolute Error, MAE)和均 方差(Mean Square Error, MSE)。從下列兩個表格之中可以看出加上了 WR 的 SRGP 其誤差值是最好的。
表 4.1-4 Mean Absolute Error Two-Peak Trap
Noise WR+SRGP SRGP Linear Regression
0% 0.05034 1.018624 38.086012
5% 2.598308 0.556869 38.146306
10% 0.05303 10.442493 38.390083
20% 29.19772 0.257071 38.656957 Central-Two Peak
Noise WR+SRGP SRGP Linear Regression 0% 7.515016 1.494001 39.313017
5% 8.923155 39.047639 39.463603
10% 13.200089 6.171924 39.772328
20% 2.79896 7.073991 40.350595
Five Uneven-Peak Trap
Noise WR+SRGP SRGP Linear Regression 0% 5.067645 0.327425 40.659737
5% 2.741011 5.27168 40.554224
10% 6.127385 9.462465 40.997616
20% 0.558123 23.936995 41.351105
Equal Maxim
Noise WR+SRGP SRGP Linear Regression
0% 0.031139 0.0618 0.3167206
5% 0.021401 0.181401 0.3155779
10% 0.038071 0.011946 0.315664 20% 0.134261 0.045783 0.3223834
Uneven Maxima
Noise WR+SRGP SRGP Linear Regression
0% 0.01013 0.101684 0.3167198
5% 0.029364 0.025691 0.3174736
10% 0.064027 0.126269 0.3166028
20% 0.139838 0.049555 0.3204712 Decreasing Maxima
Noise WR+SRGP SRGP Linear Regression
0% 0.039678 0.05842 0.2578133
5% 0.010074 0.478094 0.257879
10% 0.096952 0.33563 0.2578001
20% 0.088014 0.535014 0.2616206
Uneven Decreasing Maxima
Noise WR+SRGP SRGP Linear Regression
0% 0.035341 0.054307 0.2644252
5% 0.074034 0.039787 0.2647542
10% 0.073559 0.279569 0.2643712
20% 0.014265 0.202731 0.2652597
Doppler
Noise WR+SRGP SRGP Linear Regression
0% 0.005622 0.010394 0.0521026
5% 0.001399 0.006875 0.0521607
10% 0.005242 0.00878 0.0522101
20% 0.008711 0.014052 0.0524952
Exponential Line
Noise WR+SRGP SRGP Linear Regression
0% 0.035412 0.121311 0.076241
5% 0.112936 0.008832 0.0766808
表 4.1-5 MSE Two-Peak Trap
Noise WR+SRGP SRGP Linear Regression
0% 1.552312967 1.9524323 2265.5443
5% 7.791803734 46.864469 2268.1674
10% 23.91527312 70.810142 2299.2473
20% 79.46988251 420.93535 2354.7826
Central-Two Peak
Noise WR+SRGP SRGP Linear Regression
0% 11.57025677 12.05648536 2158.49
5% 14.22693203 972.8916049 2179.7686
10% 48.1341163 140.7937662 2220.9171
20% 156.9215359 192.5447 2261.2817
Five Uneven-Peak Trap
Noise WR+SRGP SRGP Linear Regression
0% 127.6644461 2034.52424 2280.4065
5% 78.15630375 2115.192667 2269.3445
10% 127.1710032 774.3184511 2337.4967
20% 226.6031002 478.2750421 2439.8141
Equal Maxima
Noise WR+SRGP SRGP Linear Regression
0% 0.003839462 0.021122708 0.129138
5% 0.007057487 0.020370764 0.1285011
10% 0.004320089 0.041830179 0.1287422
20% 0.008058634 0.0046227 0.1360737
Uneven Maxima
Noise WR+SRGP SRGP Linear Regression
0% 0.004034947 0.022764275 0.1284523
5% 0.003404131 0.008463563 0.1288763
10% 0.004696844 0.004164553 0.128867
20% 0.009027943 0.114023997 0.1330841
Decreasing Maxima
Noise WR+SRGP SRGP Linear Regression 0% 0.012603666 0.004430903 0.0892011
5% 0.010651548 0.054416699 0.0894401
10% 0.005738242 0.023379758 0.0897345
20% 0.006019759 0.022250248 0.0940417
Uneven Decreasing Maxima
Noise WR+SRGP SRGP Linear Regression
0% 0.001595559 0.018438472 0.0933611
5% 0.002647596 0.02473216 0.0937291
10% 0.0059233 0.010821381 0.0939559
20% 0.005539204 0.011847168 0.0964064
Doppler
Noise WR+SRGP SRGP Linear Regression
0% 0.000303952 0.002307305 0.0040351
5% 0.000254987 0.000553705 0.0040443
10% 0.000273812 0.000535899 0.0040637
20% 0.000289666 0.000703511 0.0041018
Exponential Line
Noise WR+SRGP SRGP Linear Regression
0% 0.000678795 0.001575451 0.0106735
5% 0.003007749 0.000093147 0.0108105
10% 0.000252737 0.000428283 0.0109061
20% 0.00108546 0.001405543 0.0119462
最後更近一步的比較 WR+SRGP 和 SRGP 兩個迴歸引擎的收斂情況,結果如 下所示,在下列圖式之中,y 軸代表 fitness 的值,x 軸則為演化代數。藍色的 線表示為群集中最好的染色體,紅色的線代表群集中最差的染色體,而綠色的 線則是群集fitness 值的平均值。圖(a)、(c)、(e)、(g)為 WR+SRGP 的收斂情況,
圖(b)、(d)、(f)、(h)是單獨使用 SRGP 的收斂情況。
(c) WR+SRGP 5%雜訊的收斂圖 (d) SRGP 5%雜訊的收斂圖
(e) WR+SRGP 10%雜訊的收斂圖 (f) SRGP 10%雜訊的收斂圖
(g) WR+SRGP 20%雜訊的收斂圖 (h) SRGP 20%雜訊的收斂圖 圖 4.1-19 Two-Peak Trap 的迴歸結果
(a) WR+SRGP 收斂圖 (b) SRGP 收斂圖
(c) WR+SRGP 5%雜訊的收斂圖 (d) SRGP 5%雜訊的收斂圖
(e) WR+SRGP 10%雜訊的收斂圖 (f) SRGP 10%雜訊的收斂圖
(g) WR+SRGP 20%雜訊的收斂圖 (h) SRGP 20%雜訊的收斂圖 圖 4.1-20 Central-Two Peak 的迴歸結果
(a) WR+SRGP 收斂圖 (b) SRGP 收斂圖
(c) WR+SRGP 5%雜訊的收斂圖 (d) SRGP 5%雜訊的收斂圖
(e) WR+SRGP 10%雜訊的收斂圖 (f) SRGP 10%雜訊的收斂圖
(g) WR+SRGP 20%雜訊的收斂圖 (h) SRGP 20%雜訊的收斂圖 圖 4.1-21 Five Uneven-Peak Trap 的迴歸結果
(a) WR+SRGP 收斂圖 (b) SRGP 收斂圖
(c) WR+SRGP 5%雜訊的收斂圖 (d) SRGP 5%雜訊的收斂圖
(e) WR+SRGP 10%雜訊的收斂圖 (f) SRGP 10%雜訊的收斂圖
(g) WR+SRGP 20%雜訊的收斂圖 (h) SRGP 20%雜訊的收斂圖 圖 4.1-22 Equal Maxima 的迴歸結果
(a) WR+SRGP 收斂圖 (b) SRGP 收斂圖
(c) WR+SRGP 5%雜訊的收斂圖 (d) SRGP 5%雜訊的收斂圖
(e) WR+SRGP 10%雜訊的收斂圖 (f) SRGP 10%雜訊的收斂圖
(g) WR+SRGP 20%雜訊的收斂圖 (h) SRGP 20%雜訊的收斂圖 圖 4.1-23 Uneven Maxima 的迴歸結果
(a) WR+SRGP 收斂圖 (b) SRGP 收斂圖
(c) WR+SRGP 5%雜訊的收斂圖 (d) SRGP 5%雜訊的收斂圖
(e) WR+SRGP 10%雜訊的收斂圖 (f) SRGP 10%雜訊的收斂圖
(g) WR+SRGP 20%雜訊的收斂圖 (h) SRGP 20%雜訊的收斂圖 圖 4.1-24 Decreasing Maxima 的迴歸結果
(a) WR+SRGP 收斂圖 (b) SRGP 收斂圖
(c) WR+SRGP 5%雜訊的收斂圖 (d) SRGP 5%雜訊的收斂圖
(e) WR+SRGP 10%雜訊的收斂圖 (f) SRGP 10%雜訊的收斂圖
(g) WR+SRGP 20%雜訊的收斂圖 (h) SRGP 20%雜訊的收斂圖 圖 4.1-25 Uneven Decreasing Maxima 的迴歸結果
(a) WR+SRGP 收斂圖 (b) SRGP 收斂圖
(c) WR+SRGP 5%雜訊的收斂圖 (d) SRGP 5%雜訊的收斂圖
(e) WR+SRGP 10%雜訊的收斂圖 (f) SRGP 10%雜訊的收斂圖
(g) WR+SRGP 20%雜訊的收斂圖 (h) SRGP 20%雜訊的收斂圖 圖 4.1-26 Doppler 的迴歸結果
(a) WR+SRGP 收斂圖 (b) SRGP 收斂圖
(c) WR+SRGP 5%雜訊的收斂圖 (d) SRGP 5%雜訊的收斂圖
(e) WR+SRGP 10%雜訊的收斂圖 (f) SRGP 10%雜訊的收斂圖
(g) WR+SRGP 20%雜訊的收斂圖 (h) SRGP 20%雜訊的收斂圖 圖 4.1-27 Exponential Line 的迴歸結果
WR+SRGP 的執行代數大多在 3000 代之前就已經完成收斂了,有些時驗 資料甚至可以在500 代就完成演化收斂,例如 Uneven Decreasing、Decreasing 的實驗。而SRGP 則必需演化到 15000 代左右才會完成收歛,因此加入了 WR 作為初始代數可以有效的縮短演化的代數。
從上述的實驗之中我們發現加入小波轉換的 SRGP 引擎可以快速的找出 誤差很小的迴歸公式。和其他方法相比,和原始資料的誤差確實比傳統的線性 迴歸方式來的好。加入了WR 的 SRGP 更可以有效的縮短演化代數,加速 GP
程之中依然多少會有區域最佳解的問題存在。