JavaScriptã«ãããã¼ã»ãããã³/Passive-Aggressiveä½é¨ãã¢
前回k-NNãã¢ãä½ã£ãå¾ã«ããããã¼ã»ãããã³ãåãããã«ãã¢ä½ãããããã?ãã¨æã£ãã®ã§å®è£ ãã¦ã¿ãï¼ä»åº¦ã¯ã¯ãªãã¯ã§ãã¼ã¿ç¹ã追å ã§ããããã«ãããï¼ãµã³ãã«é¸ææ¹æ³ãå¯å¤ã«ãããï¼PAã®æ´æ°ã®æ§åãå¯è¦åããã¨é¢ç½ãããã¨æã£ã¦å¾ããPAã追å ãã¦ã¿ãï¼
ãã¼ã»ãããã³ã¯èª¤åé¡ãããµã³ãã«ãæ£ããåé¡ããããã«è¶ å¹³é¢ãæ´æ°ããç·å½¢èå¥å¨ã§ï¼Passive-Aggressive (PA) ã¯æ失ãçºçããããµã³ãã«ã«å¯¾ãã¦æ失ã0ã«ãªãï¼éã¿ãã¯ãã«ã®å¤åéãæå°ã«ãªãããã«è¶ å¹³é¢ãæ´æ°ããã¢ã«ã´ãªãºã ï¼
ãªã³ã©ã¤ã³å¦ç¿ã«ã¤ãã¦ãã£ãããã俯ç°ã¯ä»¥ä¸ã®è³æãªã©ããåç §ï¼
ã¨ããããã§k-NNã¨åãããã«å ¬éï¼
使ãæ¹
Update onceãã¿ã³ã§åæå¤ã®è¶ å¹³é¢ããæ´æ°ã試ã¿ãï¼åæç»é¢ã§ã¯ãµã³ãã«ã¯ã©ã³ãã ã«é¸æãããã®ã§ï¼èª¤ãããªãå ´åã«ã¯è¶ å¹³é¢ãæ´æ°ãããªããã¨ã«æ³¨æï¼ãªãï¼æ失ãçºçãã¦ãããµã³ãã«ã¯èµ¤è²ï¼ããã§ãªããµã³ãã«ã¯ç·è²ã®ããã¯ã¹ã§å²ã¾ããï¼Trainãã¿ã³ã§ã¯#iterationã§æå®ãããåæ°ï¼Update onceãã¿ã³ãæ¼ãããã®ã¨åãæåãããï¼
ãããããªã®ã¯ï¼ãµã³ãã«é¸ææ¹æ³ã"Misclassified"ã«ãã¦ï¼Update onceãã¿ã³ãã«ãã«ãããã¨è¶ å¹³é¢æ´æ°ã®æ§åãããã£ã¦é¢ç½ããã¨æãï¼åé¢è¶ å¹³é¢ãè¦ã¤ãã£ããã¨ã«ç»é¢ãã¯ãªãã¯ãã¦ãã¼ã¿ç¹ã追å ãï¼æ´æ°ã«ãã£ã¦è¶ å¹³é¢ãã©ãå¤åããããçºãããã¨ãã§ããï¼
以ä¸ï¼ããããã®ãªãã·ã§ã³ã®èª¬æï¼
- Additional instance label ã§è¿½å ãã¼ã¿ã®ã©ãã«ãé¸æå¯è½
- ç»é¢ä¸ãã¯ãªãã¯ããã¨ãã¼ã¿ç¹ã追å ãããã¨ãã§ãã
- ç·å½¢åé¢å¯è½ãªè¶ å¹³é¢ãçºè¦ããå¾ã«èª¤åé¡ãããµã³ãã«ã追å ããã¨æ¥½ãããã
- Sample selection ã§learnerã«æ¸¡ããµã³ãã«ãé¸æããæ¹æ³ãé¸ã¶ï¼
- Random: ã©ã³ãã ã«ã²ã¨ã¤é¸ã¶
- Misclassified: 誤åé¡ãããµã³ãã«ãã©ã³ãã ã«é¸ã¶ (= å¿ ãè¶ å¹³é¢ãæ´æ°ããã)ï¼PAã®å ´åã¯ãã³ã¸ãã¹ã§æ失ãçºçãããµã³ãã«ãã©ã³ãã ã«é¸æï¼
- Learner ã§æ´æ°ã¢ã«ã´ãªãºã ãé¸æããï¼
- Perceptron: ãã¼ã»ãããã³ (å¦ç¿çãè¨å®ã§ãã)
- Passive-Aggressive: Online Passive-Aggressive algorithm
- Generate data ã§æ£è¦åå¸ã«åºã¥ãã¦è¨ç·´ãã¼ã¿ãçºçããããã¨ãã§ããï¼
- äºä¾æ°ï¼æ£è¦åå¸ã®ãã©ã¡ã¼ã¿ã¯æå®å¯è½
é©å½ãªææ³
ããã£ã¦ãã人éã«ã¨ã£ã¦ã¯ä¸è¦ãªãã¢ã ããã©ï¼Misclassifiedãªãã·ã§ã³ãé¸æãã¦ã«ãã«ããã£ã¦ã¿ãã¨ï¼ãã¼ï¼åæããï¼ã¨ããæããæ©æ¢°å¦ç¿ããã½ã¬ãªäººã«ä¼ãããã¦ä½ã£ã¦ã¿ãï¼
Perrceptronã§å¦ç¿çã大ããã¨ã¶ã£é£ãã§ãã¾ããã¨ã*1ï¼PAã§ç·å½¢åé¢å¯è½ã§ãªãã¨Misclassified sampleã«å¯¾ãã¦ã¬ã¿ã¬ã¿ããã®ãä½é¨ãããã¨ãã§ãã*2
ãã£ã±ãè¦è¦åããã¨è¦ã¦ãã¦æ¥½ããï¼ã¾ãä½ãã®ã¢ã«ã´ãªãºã ããã£ã¦ã¿ããï¼æ¬¡ã¯æ±ºå®æ¨ããã¼ã¹ãã£ã³ã°ãããã®ãã¢ãä½ã£ã¦ã¿ããï¼
2012-06-05追è¨
ãã¼ã»ãããã³ã«å¦ç¿çã£ã¦å¿ è¦ã ã£ãã£ã? ã¨ããã³ã¡ã³ããé ããã®ã§èªåã®é ã®æ´çãå ¼ãã¦ä»¥ä¸ã®è¨äºãæ¸ãã¾ãã