分类9个无理数并比较他们之间的分布差异
(2**0.5,3**0.5)—100*10*2—(1,0)(0,1)
(2**0.5,5**0.5)—100*10*2—(1,0)(0,1)
(2**0.5,e)—100*10*2—(1,0)(0,1)
(2**0.5,pi)—100*10*2—(1,0)(0,1)
(2**0.5,6**0.5)—100*10*2—(1,0)(0,1)
(2**0.5,7**0.5)—100*10*2—(1,0)(0,1)
(2**0.5,8**0.5)—100*10*2—(1,0)(0,1)
(2**0.5,10**0.5)—100*10*2—(1,0)(0,1)
做了8個網(wǎng)絡(luò)分別用來分類2**0.5和3**0.5,5**0.5,e,pi,6**0.5,7**0.5,8**0.5,10**0.5.
每個無理數(shù)保留3萬位有效數(shù)字,10個數(shù)字一張圖片,前2500張用于訓練后500張用于測試。比較這幾個無理數(shù)之間的差異有什么不同。
?
首先統(tǒng)計平均分類準確率pave
| ? | 2500-3000 | 2**0.5 | ? | ? | ? | ? | ? | ? |
| ? | 3**0.5 | 5**0.5 | e | pi | 6**0.5 | 7**0.5 | 8**0.5 | 10**0.5 |
| δ | 平均準確率p-ave | 平均準確率p-ave | 平均準確率p-ave | 平均準確率p-ave | 平均準確率p-ave | 平均準確率p-ave | 平均準確率p-ave | 平均準確率p-ave |
| 0.5 | 0.500452261 | 0.500140704 | 0.499537688 | 0.49918593 | 0.499919598 | 0.499728643 | 0.500271357 | 0.499974874 |
| 0.4 | 0.517994975 | 0.514286432 | 0.483246231 | 0.513592965 | 0.516512563 | 0.528879397 | 0.485668342 | 0.522889447 |
| 0.3 | 0.519864322 | 0.524417085 | 0.498226131 | 0.517949749 | 0.519909548 | 0.526909548 | 0.491758794 | 0.523060302 |
| 0.2 | 0.513638191 | 0.509175879 | 0.486874372 | 0.509286432 | 0.519301508 | 0.52119598 | 0.491236181 | 0.518477387 |
| 0.1 | 0.512447236 | 0.513547739 | 0.493236181 | 0.509276382 | 0.51518593 | 0.511758794 | 0.491582915 | 0.516567839 |
| 0.01 | 0.504768844 | 0.510100503 | 0.491236181 | 0.502487437 | 0.502869347 | 0.504517588 | 0.49521608 | 0.509271357 |
| 0.001 | 0.506643216 | 0.508743719 | 0.49361809 | 0.498085427 | 0.502261307 | 0.506427136 | 0.497633166 | 0.505562814 |
| 9.00E-04 | 0.504467337 | 0.509894472 | 0.492979899 | 0.499030151 | 0.502321608 | 0.505979899 | 0.49598995 | 0.506663317 |
| 8.00E-04 | 0.504919598 | 0.507306533 | 0.491341709 | 0.49938191 | 0.503160804 | 0.50440201 | 0.495321608 | 0.507899497 |
| 7.00E-04 | 0.504733668 | 0.509356784 | 0.492432161 | 0.499482412 | 0.502025126 | 0.505592965 | 0.497889447 | 0.506592965 |
| 6.00E-04 | 0.506145729 | 0.510477387 | 0.492135678 | 0.500778894 | 0.501924623 | 0.506211055 | 0.497115578 | 0.507733668 |
| 5.00E-04 | 0.506638191 | 0.508623116 | 0.494291457 | 0.501095477 | 0.501969849 | 0.505361809 | 0.497437186 | 0.505005025 |
| 4.00E-04 | 0.507050251 | 0.507512563 | 0.491351759 | 0.499376884 | 0.501497487 | 0.504653266 | 0.496472362 | 0.506386935 |
| 3.00E-04 | 0.504934673 | 0.508844221 | 0.491201005 | 0.499226131 | 0.501934673 | 0.505407035 | 0.49638191 | 0.505763819 |
| 2.00E-04 | 0.506919598 | 0.508211055 | 0.492668342 | 0.498939698 | 0.501844221 | 0.505346734 | 0.497130653 | 0.506899497 |
| 1.00E-04 | 0.504577889 | 0.507728643 | 0.493246231 | 0.499738693 | 0.503150754 | 0.50679397 | 0.498025126 | 0.507075377 |
?
畫成圖
可以看到pave分成兩類,一類是小于50%的有pi,8**0.5和e。pi的pave略小于50%,表明2**0.5和pi的數(shù)字分布差異最小,最不易區(qū)分。另一類是pave顯著大于50%,有6**0.5,5**0.5,和7**0.5,10**0.5,3**0.5.其中5**0.5的值最大,而7**0.5,10**0.5,3**0.5這3條線幾乎纏繞在一起。表明這3個數(shù),數(shù)字的分布規(guī)律接近。
?
再比較迭代次數(shù)的差異
| ? | 2500-3000 | 2**0.5 | ? | ? | ? | ? | ? | ? |
| ? | 3**0.5 | 5**0.5 | e | pi | 6**0.5 | 7**0.5 | 8**0.5 | 10**0.5 |
| δ | 迭代次數(shù)n | 迭代次數(shù)n | 迭代次數(shù)n | 迭代次數(shù)n | 迭代次數(shù)n | 迭代次數(shù)n | 迭代次數(shù)n | 迭代次數(shù)n |
| 0.5 | 19.33668342 | 21.46231156 | 17.51758794 | 19.78894472 | 19.83919598 | 18.32160804 | 18.30150754 | 18.15075377 |
| 0.4 | 11770.69849 | 10664.17085 | 11189.55779 | 13534.35678 | 12302.9799 | 11250.29648 | 14480.20603 | 12549.19095 |
| 0.3 | 57086.41709 | 30062.04523 | 34580.47236 | 60393.05528 | 46272.32663 | 27982.51256 | 82839.9799 | 37837.63317 |
| 0.2 | 135191.0503 | 120788.809 | 116589.8241 | 155078.8492 | 144089.191 | 138026.407 | 149974.5226 | 143811.2462 |
| 0.1 | 188887.3668 | 188465.4372 | 178663.6633 | 223942.9347 | 204056.1357 | 193853.9497 | 215478.4573 | 202345.005 |
| 0.01 | 301379.1156 | 301602.6281 | 299744.0854 | 331224.8744 | 303747.5226 | 309335.9899 | 330023.4724 | 313953.8342 |
| 0.001 | 421724.9246 | 426455.4925 | 427566.1055 | 454390.4271 | 426886.8844 | 432921.1508 | 471719.2412 | 443662.1759 |
| 9.00E-04 | 422781.603 | 427780.2462 | 423875.9045 | 463541.8593 | 432401.9849 | 450963.1407 | 486230.7136 | 445343.2412 |
| 8.00E-04 | 430972.1859 | 436584.196 | 452748.3869 | 469522.0704 | 438084.6633 | 463982.2513 | 493815.2764 | 459795.2462 |
| 7.00E-04 | 442785.7789 | 448578.2864 | 452554.5729 | 478613.8342 | 448150.6734 | 470797.5126 | 503312.9095 | 469001.3166 |
| 6.00E-04 | 455381.5578 | 463744.0653 | 459869.4724 | 499163.2211 | 466124.7437 | 481626.995 | 519613.5628 | 474531.4271 |
| 5.00E-04 | 467498.3266 | 485689.8392 | 466761.0905 | 507353.9698 | 489677.3568 | 503013.1407 | 544202.0251 | 495688.9698 |
| 4.00E-04 | 488769.1357 | 502967.1859 | 489836.603 | 536803.005 | 502668.8794 | 517509.5075 | 568515.9347 | 514145.794 |
| 3.00E-04 | 508326.191 | 523964.7186 | 528504.8643 | 564641.9497 | 518025.1709 | 556086.8894 | 606002.7236 | 552131.4673 |
| 2.00E-04 | 564547.0955 | 567855.5276 | 569002.3518 | 606663.7236 | 562929.1206 | 607040.6281 | 658516.7538 | 600759.8191 |
| 1.00E-04 | 646090.0402 | 660761.2312 | 660039.6482 | 703975.5025 | 655903.1106 | 706416.8894 | 793831.5176 | 655716.3869 |
?
只有8**0.5的迭代次數(shù)顯著的大些,而其他的網(wǎng)絡(luò)的迭代次數(shù)相差很小,區(qū)別不大。完全相同的兩個對象無法被分成兩類,迭代次數(shù)越大表明二者差異越小,表明2**0.5和8**0.5的差異是最小的。
?
無理數(shù)的數(shù)據(jù)來源
https://www.wolframalpha.com/input/?i=x%5E2-1
N[sqr(2),30000]
?
總結(jié)
以上是生活随笔為你收集整理的分类9个无理数并比较他们之间的分布差异的全部內(nèi)容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: 柳州东桂丰泽轩是毛坯房还是精装修?
- 下一篇: 用神经网络分类随机数与无理数