ï¼±ï¼ãªãåæ£ã¯ãåç´ãªå·®ï¼åå·®ã®çµ¶å¯¾å¤ï¼ã§ã¯ãªããå·®ã®ï¼ä¹ãè¨ç®ããã®ãï¼
Aï¼åæ£ãæãå°ããããç¹ãå¹³åå¤ã ãããï¼åç´ãªå·®ãæãå°ããããç¹ã¯ä¸å¤®å¤ã¨ãªããï¼
âåæ£âã¨ãããã¼ã¯ã¼ãã¯çµ±è¨å¦ã®åºç¤ä¸ã®åºç¤ã§ãããã©ããªæç§æ¸ã«ãâå¹³åâã®æ¬¡ãããã«è¼ã£ã¦ãããã¨ããã§ãã
ããããªããããããªãç»å ´ããâåæ£âã®æå³ãåããããçµ±è¨å¦ã®å
¥ãå£ã§æ«æãã人ã¯å°ãªãããã¾ããã
åå·®ã®ï¼ä¹ã®å¹³åãã¤ã¾ããåå¤ã¨å¹³åã¨ã®å·®ã®ï¼ä¹ã®å¹³åãåæ£ã¨ããã
åæ£ã®å¹³æ¹æ ¹ã®æ£ã®æ¹ãæ¨æºåå·®ã¨ããã
çµ±è¨ã§ãã¡ãã°ãã表ããã®ã¨ãã¦ãæ¨æºåå·®ãåæ£ãå¤ãç¨ããããã
ãããããã-- é«æ ¡ã®æç§æ¸ï¼åæ館ï¼ãã.
æç§æ¸ã«ã¯ãã®ããã«æ¸ããã¦ããã®ã§ãããããã§åãã£ãæ°ã«ãªãã§ããããã
ãã»ãªããå·®ã®ï¼ä¹ãè¨ç®ããã®ãï¼
ãã»å·®ãã®ãã®ã§ãã£ã¦ã¯ãããªãã®ãï¼
ãã»ãªããåæ£ã¨æ¨æºåå·®ã®ï¼ç¨®é¡ãããã®ãï¼
æå¾ã®çåã«ã¤ãã¦ã¯ãåæ£ãï¼ä¹ããçµæãªã®ã§ãå
ã®åä½ã«æ»ãããã«å¹³æ¹æ ¹ãã¨ãå¿
è¦ããããã®ã ã¨èª¬æããã¾ãã
ãã(æ¨æºåå·®) ï¼ â(åæ£)
ã ã¨ããã¨ãããããå¤ãï¼ç¨®é¡ä½ããªããã°ãªããªãã£ãçç±ã¯ï¼ä¹ãè¨ç®ããããã§ãã£ã¦ã
æåããå·®ãã®ãã®ãæ¡ç¨ãã¦ããã°ï¼ç¨®é¡ã§æ¸ãã ã¯ãã§ãã
åãã¼ã¿ã¨å¹³åå¤ã¨ã®å·®ã®ãã¨ããåå·®ãã¨è¨ãã¾ãã
åæ£ã¨ã¯ãåå·®ãï¼ä¹ããå¤ã®å¹³åã®ãã¨ã§ãã
ä¸æ¹ãåå·®ã®å¤ãã®ãã®ï¼çµ¶å¯¾å¤ï¼ã®å¹³åã¯ãå¹³ååå·®ãã¨å¼ã°ãã¦ãã¾ãã
åæ£ï¼ã¨æ¨æºåå·®ï¼ã«æ¯ã¹ã¦ãå¹³ååå·®ã¯ãã¾ãæåã§ã¯ããã¾ããããå
¨ã¦ã®æç§æ¸ã«è¼ã£ã¦ããããã§ãããã¾ããã
ããä½ã®äºåç¥èãç¡ãã«ãã°ãã¤ããæ°åã§ç¤ºããã¨è¨ããããªãã
ãã¼ã¿ã®å·®ãã®ãã®ãæã£ã¦ããå¹³ååå·®ã®æ¹ããã»ã©èªç¶ã«æãã¾ãã
ãªã®ã«ãªããä»æ¥ã®çµ±è¨ã§ã¯ããããããåæ£ï¼ã¨æ¨æºåå·®ï¼ã®æ¹ã主æµãªã®ã§ããããã
æ´å²ãæ¯ãè¿ã£ã¦ã¿ãã¨ãåå·®ã®ï¼ä¹ãä¸è¬åãã以åã«ãå·®ãã®ãã®ãã°ãã¤ãã®ææ¨ã¨æãã¦ããææãããã¾ããã
ä¾ãã°ã©ãã©ã¹ã¯ãå·®ãã®ãã®ã誤差æ失ã®ææ¨ã¨ãã¦æ±ã£ã¦ããã¨ããçµç·¯ãããã¾ãã
ã¯ã£ããã¨ï¼ä¹ãææ¨ã¨ããããã«ãªã£ãã®ã¯ãã¬ã¦ã¹ã®ç»å ´ä»¥éã®ãã¨ãªã®ã§ãã
Laplaceã¯ãã®ãã¨ãåããããªæ¹æ³ã§èå¯ããããããå½¼ã¯ãã¤ãã«æ£ã¨ãã¦æ±ããã誤差èªèº«ãæ失ã®éã¨ãã¦é¸ãã ã
ãããã-- ã¬ã¦ã¹èª¤å·®è«ãã.
â æå°ï¼ä¹æ³ã®ããã
ã§ã¯ãªããã¬ã¦ã¹ã¯ï¼ä¹ãèããã®ãã
ãã®å¿ãç¥ãã«ã¯ãã¬ã¦ã¹ã®ã家è¸ã§ããâæå°ï¼ä¹æ³âãã²ãã¨ãã®ãæ©éã§ãã
æå°ï¼ä¹æ³ã¨ã¯ã誤差ãå«ãã ãã¼ã¿ã«å¯¾ãã¦ããã£ã¨ãããå½ã¦ã¯ã¾ãé¢ä¿ãè¦åºãæ¹æ³ã§ãã
ä¾ãã°ãã¨ããã°ã«ã¼ãã®èº«é·ã¨ä½éã®ãã¼ã¿ãããããªé¢¨ã ã£ãã¨ãã¾ãããã
ããã§ã身é·ãé«ãã»ã©ä½éãéããã¨ããé¢ä¿ãï¼æ¬ã®ç´ç·ã§ç¤ºãã«ã¯ãã©ã®ããã«ç·ãå¼ãã®ããã£ã¨ãåççã§ããããã
æå°ï¼ä¹æ³ã§ã¯ã次ã®ããã«èãã¾ãã
ä¸æ¬ã®æ£ã¨ãããããã®ãã¼ã¿ã®éãããã§çµãã§å¼ã£å¼µãã¨ãæ£ã¯ã»ã©ããã¨ããã«è½ã¡çãã¾ãã
ãã®è½ã¡çããå
ã®ç¶æ
ãããã£ã¨ãå½ã¦ã¯ã¾ããè¯ããã¨è¦ãªãã®ããæå°ï¼ä¹æ³ã®èãæ¹ã§ãã
ãªãï¼ä¹ãªã®ãã¨ããã¨ãããã¯å¼ã£å¼µãã°å¼ã£å¼µãã»ã©ãé·ãã«æ¯ä¾ããåããããããã§ãã
ããã®é·ããï¼åã«å¼ã伸ã°ãã«ã¯ã
ãã»é·ããï¼å
ãã»åãï¼å
åããã¦ï¼Ãï¼ï¼ï¼åã®ã¨ãã«ã®ã¼ãå¿
è¦ã§ãã
ãããï¼ä¹ã®ç±æ¥ã§ãã
æå°ï¼ä¹æ³ã¨ã¯ãã¤ã¾ããããã«æºã¾ã£ãã¨ãã«ã®ã¼ãæå°ã¨ãªãä½ç½®ãæ¢ãæ¹æ³ãã®ãã¨ã ã£ãã®ã§ãã
* â«ãã§ãã£ã¨ä¼¸ã³ãã¯ã¨ãã«ã®ã¼ãããã¯çãç¥ã£ã¦ãã
>> http://miku.motion.ne.jp/multi/01_MinSquare.html
ãã¾ãï¼æ¬¡å
ã®ã°ã©ãã§è¦ãæ¹æ³ããããã«åç´åãã¦ï¼æ¬¡å
ã¨ãã¦ã¿ã¾ãããã
è¤æ°åã®ãã¼ã¿ã¨ãèªç±ã«åããããã¨ããï¼ç¹ãããã§çµãã ã¨ããããã¨ããï¼ç¹ã¯ã©ãã«è½ã¡çããã
è½ã¡çãå
ã¯ãã¡ããã©ãã¼ã¿ã®å¹³åå¤ã¨ãªãã¾ãã
â» ï¼æ¬¡å
ã®å ´åãå½ã¦ã¯ããç´ç·ï¼å帰ç´ç·ï¼ã¯å¿
ãå¹³åå¤ãéãã¾ãã
å¹³åå¤ã¨ã¯ããããã«æºã¾ã£ãã¨ãã«ã®ã¼ãæå°ã¨ãªãç¹ãã®ãã¨ã ã£ãã®ã§ãã
ããã¦ãããã«æºã¾ã£ãã¨ãã«ã®ã¼ãã¨ã¯ãåãã¼ã¿ã¨å¹³åã¨ã®å·®ã®ï¼ä¹ãã¤ã¾ãåæ£ã«æ¯ä¾ãã¦ãã¾ãã
ãããã¦æå
ã®ãã¼ã¿ããããã£ã¨ãå½ã¦ã¯ã¾ãã®è¯ãç¹ãæ¢ããã¨èããã¨ããåæ£ã®æå°åã¨ããã¢ã¤ãã¢ã«å°ãããããã§ãã
â åæ£ã®å æ³æ§
ããã§ï¼ã¤ã¯ã¤ãºã
ããåããå¹³åï¼cmã®æåèªãï¼å¹´åç©ã¿ä¸ããããé«ãã¯å¹³åã§ä½cmã«ãªããï¼ã
çã¯å½ç¶ãï¼ï¼cmã
ã§ã¯æ¬¡ã«ã
ãããã®éèªã®ã°ãã¤ãã¯Â±ï¼mmã ã£ããï¼å¹´åç©ã¿ä¸ããã¨ããã°ãã¤ãã¯Â±ä½mmã«ãªããï¼ã
ããã§ã®ãã°ãã¤ãã±ï¼mmãã®æå³ã§ããã話ãåç´åãã¦ãéèªã®åãã«ã¯ 9mm 㨠11mm ã®ï¼ç¨®é¡ããç¡ãã¦ã
ãã®ï¼ç¨®é¡ãæ¯æã©ã³ãã ã«çºè¡ããããã®ã¨ãã¾ãããã
çã®é¸æè¢ï¼ï¼å¹´åã®ã°ãã¤ãã¯ã»ã»ã»
ã(a) ±ï¼ï¼mmãã±ï¼mm à 12ã¶æã ããã
ã(b) ±ï¼mmãããï¼ã¨ï¼ãæã¡æ¶ãåã£ã¦ï¼ã«ãªãã®ã§ã
ã(c) ±ï¼ï¼mm ã§ã ±ï¼mm ã§ããªããä¸éå端ãªæ°ã
ã
ã
ã
ã
ã
ããããã»ã»ã»ã¡ãã£ã¨èãã¦ã¿ããã»ã»ã»
ã
ã
ã
ã
ã
æ£è§£ã¯ (c)ã
試ã㫠±1 ã®ä¹±æ°ãï¼ï¼åãä½åã足ãåãããå¹³åã®çµ¶å¯¾å¤ãã¨ã㨠2.7mm ãããã®å¤ã¨ãªãã¾ãã
ï¼ï¼é
ä¿æ°ãç¨ãã¦è©³ããè¨ç®ãã㨠2.70703125... ã¨ãã£ãå¤ã«ãªãã¾ããï¼
ã¤ã¾ããã°ãã¤ãã«é¢ãã¦ã¯åç´ãªè¶³ãç®ãã§ããªãã¨ãããã¨ã§ãã
ä½ã¨ãä¸æãå
·åã«âã°ãã¤ãã®è¶³ãç®âãã§ããªããã®ã ãããã»ã»ã»
ããã§ç·¨ã¿åºãããã®ããï¼ä¹ããã°è¶³ãç®ã§ãããã¨ããã¢ã¤ãã¢ã§ãã
±ï¼mm ã®ä¹±æ°ãï¼ï¼åãã£ãã¨ãã¦ãããããããã 足ãåãããã®ã§ã¯ãªããï¼ä¹ãã¦è¶³ãåããã¦ã¿ã¾ãããã
ãã(±1)^2 + (±1)^2 + (±1)^2 + ・・・ ±1)^2 = 12
ãããªãåã
ã®ã°ãã¤ãããã©ã¹ã§ãã£ã¦ããã¤ãã¹ã§ãã£ã¦ããåè¨ã¯ç¢ºå®ã«+12ã¨ãªãã§ãããã
ãã®ããã«ãï¼ä¹ããå¤ã«ãã£ã¦ã°ãã¤ããæ°ããã®ããåæ£ã¨ããææ¨ã ã£ãã®ã§ãã
ãã»éèªï¼åãããã®åæ£ ããï¼ ãï¼
ãã»12åç©ã¿éããå
¨ä½ã®åæ£ ï¼ ï¼ï¼
ãããâ»12åã®ãµã³ãã«ããããããã£ãã¨ãã®åæ£ãã¤ã¾ãæ¯å¹´ã®éèªã®å±±ããããã並ã¹ãã¨ãã®ã°ãã¤ãã
åæ£ã¯è¶³ãç®ãããã¨ãã§ããã
ãã®æ§è³ªãåæ£ã®å æ³æ§ã¨è¨ããã¨ãããã¾ãã
ãããã足ãç®ãã§ãããããªææ¨ãæ¢ããã¨ããããã¾ããã£ãã®ãåæ£ã§ãã£ããã¨ããã®ãå®æ
ã§ãããã
ã§ã¯ãéèªï¼å¹´åã®åæ£ã12ã ã£ãã¨ãã¦ãå®éã«éèªã®å±±ã®é«ãã¯Â±ä½mmç¨åº¦ãªã®ã§ããããã
ããã§åæ£ã®å¹³æ¹æ ¹ãã¨ã£ã¦ãå
ã®æ¬¡å
ã«æ»ããã®ãæ¨æºåå·®ã§ãã
ä»ã®å ´åã
ãã(æ¨æºåå·®) = â12 = 3.46mm
ã¨ãã£ãå¤ã¨ãªãã¾ãã
â» æ¨æºåå·® 3.46mm ã¯ãå°ãä¸ã«æ¸ããå¹³ååå·® 2.71mm ã¨ã¯ç°ãªãã¾ãã
â» æ¨æºåå·®ã¯åå·®ï¼ä¹åã®å¹³åãå¹³ååå·®ã¯å差絶対å¤ã®å¹³åã§ã â ãã¤ããããã§ããããããã¨ãããééãã®ã§ã
â åæ£ã®ã¨ãã«ã®ã¼è§£é
ãã»åæ£ã¨ã¯ãããã«æºã¾ã£ãã¨ãã«ã®ã¼ãã®ãã¨ã
ãã»åæ£ã¨ã¯ã足ãç®ã§ããããã«ãç·¨ã¿åºãããã°ãã¤ãã®ææ¨ã
ãã®ï¼ã¤ãããªãåæ£ãï¼ä¹ãªã®ããã«ã¤ãã¦ã®ä¸»ãªçã«ãªãã¨æãã¾ãã
ããã«ç©¿ã£ãè¦æ¹ããããªãã°ããã®ï¼ã¤ã¯å¥ã
ã®äºæã§ã¯ãªããå
±éã®å
容ãå«ãã§ããã¨è§£éãããã¨ãã§ããã§ãããã
ããããã¨ãã«ã®ã¼ã¨ã¯ä½ã ã£ããã¨ããã°ã
ããç©ççã«ãæéå¤åã«å¯¾ãã¦ä¸å¤ãªä¿åéã
ã®ãã¨ã§ããã
ä½ããã®ãã¼ã¿æä½ã«ã¤ãã¦ãä¾ãã°ä¸ã«è¿°ã¹ãâããã¨æ£âã®ãããªç©ççãªã¢ãã«ãèãããªãã
ãã®ã¢ãã«ä¸ã§è¶³ãç®ã§ããä¿åéã¯ãèªãã¨ã¨ãã«ã®ã¼ã«å¯¾å¿ä»ããããã¯ãã§ãã
ãã¨åæ£ã«ã¤ãã¦ã¯ããå¤ä½ã®ï¼ä¹ã§æºã¾ãã¨ãã«ã®ã¼ã®ãããªä¿åéãã¨ããã¤ã¡ã¼ã¸ã§ææ¡ã§ããã¨æãã¾ãã
ãã®ç·ã§æ¨æºåå·®ã«è§£éãå ãããªãã
ããåãã¼ã¿ã«ã¨ãã«ã®ã¼ãçããåé
ããã¨ããï¼åãããã®ãã¼ã¿ãå¤ä½ãã大ããã
ã¨ãããã¨ã«ãªãã¾ãã
â æå°çµ¶å¯¾å¤æ³ã§ã¯ãã¡ãªã®ã
以ä¸ãåæ£ï¼ã¨æ¨æºåå·®ï¼ããããã«ã°ãã¤ãã®ææ¨ã¨ãã¦åççã§ããããè¦ã¦ãã¾ããã
ãªãã°ãã°ãã¤ãã®ææ¨ã¯åæ£ã ããå¯ä¸ç¡äºã§ããããã以å¤ã«ã¯ããå¾ãªãã®ã§ããããã
å®ã¯ããã§ãç¡ãã®ã§ãã
åæ£ã¯ãä¸è¬çã«ã¯æãåªããææ¨ãªã®ã§ãããå ´åã«ãã£ã¦ã¯åæ£ä»¥å¤ã®ææ¨ãæç¨ãªãã¨ãããã¾ãã
å
ã«ãåæ£ ï½ æå°ï¼ä¹æ³ã«åºã¥ãã¦ãã¼ã¿ã®å½ã¦ã¯ã¾ããèããã®ã§ããã
次ã«ãåå·®ã®å¤ãã®ãã® ï½ âæå°çµ¶å¯¾å¤æ³âã«åºã¥ããã¼ã¿ã®å½ã¦ã¯ã¾ããèãã¦ã¿ã¾ãããã
ï¼æ¬¡å
ã®å ´åããããã¼ã¿ãï¼ã¤ã ãã ã£ããªãã
ãã£ã¨ãå½ã¦ã¯ã¾ãã®è¯ãç¹ã¯ãï¼ã¤ã®ãã¼ã¿ã®éã®ã©ãã§ãè¯ããã¨ã«ãªãã¾ãã
ãã®ããã«æå°çµ¶å¯¾å¤æ³ã«ã¯ãçµæãï¼ç¹ã«è½ã¡çããªãã¨ãã£ãä¸å®æ§ãããã¾ãã
ãããæå°çµ¶å¯¾å¤æ³ ï½ å¹³ååå·®ãæµè¡ããªãï¼ã¤ã®çç±ã§ãã
ãã¼ã¿ã®æ°ãããå°ãå¢ããã¦ã¿ã¾ãããã
ãããã¼ã¿ãï¼ã¤ã ã£ããªããæå°çµ¶å¯¾å¤æ³ã«ãããã£ã¨ãå½ã¦ã¯ã¾ãã®è¯ãç¹ã¯ãä¸å¤®ã®ï¼çªç®ã®ç¹ã«ãªãã¾ãã
å¹³ååå·®ãåºæºã«èãããªãã
ãã»ãã¼ã¿ãå¥æ°åã®å ´åãé ä½ãä¸å¤®ã®ç¹ã¨ãªãã
ãã»ãã¼ã¿ãå¶æ°åã®å ´åãé ä½ãä¸å¤®ã«æãè¿ãï¼ç¹ã®éã®ã©ãã§ãããã
ã¤ã¾ãããã¯ãä¸å¤®å¤ãã¨ãããã¨ã§ãã
â» ä¸å¤®å¤ã®å®ç¾©ã¨ãã¦ã¯ããã¼ã¿ãå¶æ°åã®å ´åãä¸å¤®ã«æãè¿ãï¼ç¹ã®ã¡ããã©ä¸éï¼å¹³åï¼ã¨ãªãã¾ãã
ã»åæ£ãããï¼åå·®ã®ï¼ä¹ã®å¹³åå¤ããï¼ãæå°ï¼ä¹æ³ããï¼ãæå°ã¨ãªãç¹ã¯å¹³åå¤
ã»å¹³ååå·®ãï¼åå·®ã®çµ¶å¯¾å¤ã®å¹³åå¤ãï¼ãæå°çµ¶å¯¾å¤æ³ãï¼ãæå°ã¨ãªãç¹ã¯ä¸å¤®å¤
ãã®ããã«å¯¾æ¯ããã¦ã¿ãã°ã決ãã¦âåæ£ãåªãã¦ãã¦ãå¹³ååå·®ãå£ã£ã¦ããâããã§ã¯ç¡ãã®ã ã¨åããã§ãããã
ããã«èå³æ·±ãã®ã¯ãï¼æ¬¡å
ã®å ´åã§ãã
ä¸è¬ã«ããç¨ãããã¦ããæå°ï¼ä¹æ³ã§ã¯ãªããæå°çµ¶å¯¾å¤æ³ã«ããç´ç·ã®å½ã¦ã¯ãããããã¯ããã§ã¢ãªãªã®ã§ãã
* æå°çµ¶å¯¾å¤æ³ã«ããå帰åæ
>> http://www.orsj.or.jp/~archive/pdf/e_mag/Vol.40_02_261.pdf
* æå°äºä¹ã¨æå°çµ¶å¯¾å¤ï¼ããã¹ãå帰ã§å¤ãå¤åæ
>>https://biolab.sakura.ne.jp/robust-regression.html
* Excelã§æãï¼èª¤å·®ã®çµ¶å¯¾å¤åãæå°ã«ãã
>> http://godfoot.world.coocan.jp/Abs_Min.htm
æåã®ãªã³ã¯å
ã«ãã©ãã©ã¹ã®èããæå°çµ¶å¯¾å¤ã«åºã¥ãæ¹æ³ãè¼ã£ã¦ãã¾ããã
ãã®å帰åæè¦æºï¼1ï¼ãæè¯ã®ãã®ã¨èãï¼ãã®ã¢ã«ã´ãªãºã ãæåã«ææ¡ããã®ã¯Laplaceï¼»PiereSimmonMarquisdeLaplaceï¼1749ï¼1827ï¼½ã§ããã
ãªã³ã¯å
ã®èª¬æãåèã«ãã©ãã©ã¹ã®èããç´ç·å½ã¦ã¯ãã®æ¹æ³ã試ãã¦ã¿ã¾ããã
ã»åç¹ãéãç´ç·ãèããã
ã»åãã¼ã¿ãå¾ãã®é çªã«ä¸¦ã¹ããY1/X1 >= Y2/X2 >= Y3/X3 ・・・ Yn/Xn
ã»X1 + X2 + X3 ・・・ + Xr-1 < Xr + Xr+1 + Xr+2 ・・・ + Xnããã¤
ãX1 + X2 + X3 ・・・ + Xr > Xr+1 + Xr+2 ・・・ + Xnãã¨ãªã r ãæ¢ãã
ãã¤ã¾ããå¾ãã®å¤§ããæ¹ãã X ãåè¨ãã¦ãã£ã¦ãåè¨å¤ãæ®ãã®åè¨ãã¡ããã©è¶ããçªå· r ãæ¢ãã
ã»æãå½ã¦ã¯ã¾ãã®ããå¾ãã¨ãã¦ãYr/Xr ãæ¡ç¨ããã
ããã¯å½ã¦ã¯ãçµæã®ï¼ä¾ã§ãã
éç·ãæå°ï¼ä¹æ³ã赤ç·ãã©ãã©ã¹ã®èããæå°çµ¶å¯¾å¤æ³ã§ãã
ãã®ä¾ã®ããã«æ¥µç«¯ãªå¤ãå¤ãæ··ãã£ã¦ããå ´åãæå°ï¼ä¹æ³ã¯å¤ãå¤ã«å¼ã£å¼µãããããå½ã¦ã¯ã¾ããæªããªãã¾ãã
ä¸å¤®å¤ãå¹³åå¤ã«æ¯ã¹ã¦å¤ãå¤ã«å¼·ãããã«ãæå°çµ¶å¯¾å¤æ³ã«ã¯å¤ãå¤ã«å¯¾ãã¦é å¥ãªæ§è³ªãããã¾ãã
å帰åæã®ãã¦ãã¾ãè©ä¾¡ã®ææ¨ã¨ãã¦ãRMSE, ã¾ã㯠MAE ã¨ããå¤ãããç¨ãããã¾ãã
ãããã¯ä½ãªã®ãã¨ããã¨ãåæ£ã¨å¹³ååå·®ããããã¯å¹³åå¤ã¨ä¸å¤®å¤ãã¨ãã並ã³ã«ä½ç½®ã¥ãããããã®ã§ãã
* å¹³åå¹³æ¹äºä¹èª¤å·® = RMSEï¼Root Mean Square Errorï¼
ã»RMSE ã®æå°å = äºä¹èª¤å·®ã®æå°å = 誤差ã«æ£è¦åå¸ãä»®å®ããå ´åã®æå°¤æ¨å®
* å¹³å絶対誤差 = MAEï¼Mean Absolute Errorï¼
ã»MAE ã®æå°å = 絶対誤差ã®æå°å = 誤差ã«ã©ãã©ã¹åå¸ãä»®å®ããå ´åã®æå°¤æ¨å®
ã-- 精度è©ä¾¡ææ¨ã¨å帰ã¢ãã«ã®è©ä¾¡
ã>> https://funatsu-lab.github.io/open-course-ware/basic-theory/accuracy-index/
ãããã¯æè¿æµè¡ãã®æ©æ¢°å¦ç¿ã«ç»å ´ãã L1æ£åå(Lasso), L2æ£åå(Ridge) ã¨ãã£ããã¼ã¯ã¼ããããã¯ããããã®æ¦å¿µã®å»¶é·ä¸ã«ä½ç½®ã¥ãããã¾ãã
â ã¬ã¦ã¹èª¤å·®è«ãã
ãªãï¼ä¹ãªã®ãããã®æºæµãé¡ãã¨ãã¬ã¦ã¹ã®èª¤å·®è«ã«ãã©ãçãã¾ãã
確ãã«ï¼ä¹ã¯åªããæ¦å¿µãªã®ã ãããªãã°ï¼ä¹ãæ¯ããæ ¹æ ã»åçã¯ä½ãªã®ããï¼ä¹ä»¥å¤ã®æ¦å¿µã¯ããå¾ãªãã®ãã
ç§ã¯é·ãããã®çåãæ±ãã¦ããã®ã§ãããå
ç¥ã¬ã¦ã¹ã®è¨èã«ããããçãè¦ãããã«æãã¾ãã
ä»ããã§ãããï¼æ¨æ¸¬ï¼çµ±è¨å¦ã¨ã¯ãã¼ã¿ãã帰ç´çã«å°ããããã®ã§ããã
ä»ã®æ°å¦ã®ããã«åçååããæ¼ç¹¹çã«å°ããããã®ã§ã¯ããã¾ããã
ãã®æå³ã§ãï¼ä¹ãå¯ä¸çµ¶å¯¾ã®æ¹æ³ã§ã¯ç¡ãã£ãã®ã§ãã
ãã ããã£ããï¼ä¹ãé¢ãã¦ä»ã®ããããæ¹æ³ã¨æ¯ã¹ã¦ã¿ãã¨ãæ¹ãã¦ï¼ä¹ãããæãåç´ã§é©ãã¦ããã¨èªããããå¾ã¾ããã
ãããåæ£ãï¼ä¹ã§æ°ããçç±ã§ãããä»æ¥ã«è³ãã¾ã§çµ±è¨å¦ã®æ ¹åºã«æµãç¶ããåºç¤ã ã£ãã®ã§ãã
â Python ã«ãã Laplaceã®çµ¶å¯¾å¤å帰
import numpy as np
import matplotlib.pyplot as plt
def fit_line(x, y):
mx = np.mean(x)
my = np.mean(y)
myx = np.mean(y * x)
mxx = np.mean(x * x)
w0 = (myx - my * mx ) / (mxx - mx ** 2)
w1 = my - w0 * mx
return ( w0, w1 )
N_SAMPLE = 10
ALPHA = 0.0
BETA = 0.3
EPS = 0.1
X = np.random.rand(N_SAMPLE)
Y = ALPHA + BETA * X + EPS * np.random.standard_cauchy(size=N_SAMPLE)
lin, seg = fit_line( X, Y )
print( "ç·å½¢å帰ã®å¾ã,åç = {:.4f}, {:04f}".format( lin, seg ) )
YperX =Y / X
Slp_index = {}
for idx in range(N_SAMPLE):
Slp_index[idx] = YperX[idx]
x_list = []
idx_list = []
for key, val in sorted(Slp_index.items(), key=lambda x: -x[1]):
idx_list.append(key)
x_list.append( X[key] )
r_index = 0
for r in range( N_SAMPLE+1 ):
pre = x_list[ 0 : r ]
post = x_list[ r : len(x_list)+1 ]
if sum(pre) >= sum(post):
r_index = r -1
break
x_esti = idx_list[ r_index ]
lap = YperX[x_esti]
print( "Laplaceå帰ã®å¾ã = {:.4f}".format( lap ) )
xlist = np.arange(0, 1, 0.01)
ylist_lsq = [ (lin * x + seg) for x in xlist ]
ylist_lap = [ (lap * x) for x in xlist ]
plt.plot(X, Y, 'o')
plt.plot(xlist, ylist_lsq, color="blue", label="lsm")
plt.plot(xlist, ylist_lap, color="red", label="laplace")
plt.legend(loc='lower right')
plt.show()