å æ¥ãããªãã¨ããã£ã¦ãã¾ããã
ãªãã©ã¤ã³ãã¹ãã«ã¯ãã¤ã¢ã¹ãã¤ããã®ã§ããã®ã¸ããèæ ®ããã«ãªãã©ã¤ã³è©ä¾¡ãããã¨ããã¨ãã¡ãã£ã¨å°ã£ããã¨ãçºçãããã¨ã確èªããæãã§ããã
ä»åã¯ãããªãªãã©ã¤ã³ãã¹ãã§ãã¤ã¢ã¹ãèæ ®ããªããè©ä¾¡ããæ¹æ³ã«ã¤ãã¦èª¿ã¹ã¦ã¿ãã®ã§ãã®ã¡ã¢ã§ãã
ãªãã©ã¤ã³è©ä¾¡
ãªããªãã©ã¤ã³è©ä¾¡ãå¿ è¦ï¼
ç´ æ´ãªçåã¨ãã¦ã"ãããããªãã©ã¤ã³è©ä¾¡ãããªããããã®ã§ã¯ï¼"ã¿ãããªçåããããã¨æãã®ã§ããã®ç¹ããæ´çãã¾ãã
ã·ã¹ãã ã«å¯¾ãã¦ä½ãããã®æ©è½æ¹åã®ããã«ã¢ã«ã´ãªãºã ãä¿®æ£ããç¶æ³ãèãã¾ãã ä¿®æ£ããã¤ãã®ã¹ãããã¨ãã¦ã¯ãå®éã«ãã®æ½çãã¦ã¼ã¶ã¼ã«ã¨ã£ã¦ã¡ãªããããããã確èªããå¿ è¦ãããã¾ãã ãã®è©ä¾¡ã®ããã«ãA/Bãã¹ããå§ãã¨ãããªã³ã©ã¤ã³ãã¹ããå®æ½ãã¦ãè¯ããã§ãããã§ããã°ãã®åã«ããç¨åº¦è¯ãæªãããããã°ããã«è¶ãããã¨ã¯ããã¾ãããã
ä¸å¿èª¿ã¹ã¦ã¿ãã¨ããããªæãã§æ¸ãã¦ããè¨äºãè¦ã¤ãããã¨ãã§ãã¾ãã
Part 1ã§è¡ã£ãå®é¨ã¯, ã¢ã«ã´ãªãºã ãå®éã®ã·ã¹ãã ã§èµ°ãããæã®æ§è½è©ä¾¡ãæ³å®ãã¦ãã¾ããã, å®éãã®ããã«çæ³çãªã¢ã«ã´ãªãºã ã®æ§è½è©ä¾¡ãè¡ããã¨ãé£ããå ´åãå¤ã ã§ã. ä½æ ãªãã°, ããã¢ã«ã´ãªãºã ãä¸å®æéå®éã®ãµã¼ãã¹ã§èµ°ãããä¸ã§æ§è½ãè©ä¾¡ãããã¨æã£ã¦ã, ãããæ§è½ã®æªããã®ã§ãã£ãã, ã¦ã¼ã¶ã¼ä½é¨ã害ãã¦ãã¾ã£ãããµã¼ãã¹ããã®åå ¥ã«å½±é¿ããããããããªãããã§ã. Netflixを超えていけ!Contextual Banditアルゴリズムを徹底解説!(Part 2) - Qiita
ä¸è¨ã®ããã«ãå®éã«ãªã³ã©ã¤ã³ãã¹ãããªãªã¼ã¹ããåã«äºåã«ãã®ãªãªã¼ã¹ãè¯ããããã確èªãã¦ãããããªãã¾ãã ãããªãããªã§ãå¤ãã®å ´åãªã³ã©ã¤ã³ãã¹ãã®åã«ãªãã©ã¤ã³ãã¹ããè¡ããããã¨æãã¾ãã
Counterfactual (åäºå®)ã®åé¡
次ã«ãæ¨è¦ãæ¤ç´¢ãªã©ã®ã©ã³ãã³ã°ã¢ã«ã´ãªãºã ã®æ©è½æ¹åãè¡ãéã«ããªãã©ã¤ã³ãã¹ãã§ã©ããªåé¡ãçºçãããèãã¦ããã¾ãã
ä»ãå®éç¨ãã¦ããã©ã³ãã³ã°ã¢ã«ã´ãªãºã ã«ã¤ãã¦ä½ããã®æ©è½æ¹åãããã¨ãã¾ãã ããã¦ãå®éç¨ãã¦ããã©ã³ãã³ã°ã¢ã«ã´ãªãºã ã«å¯¾ããã¦ã¼ã¶ã¼ã®ãªã¢ã¯ã·ã§ã³ï¼ã¯ãªãã¯ãè³¼å ¥ãªã©ï¼ã®ãã°ãåãã¦ããã®ã§ããã®ãã°ã使ã£ã¦æ©è½æ¹åã®åå¾ã§ã®ã©ã³ãã³ã°ãè©ä¾¡ãããã¨ãèãã¾ãã
ãã¦ããã®ã¾ã¾ãªãã©ã¤ã³è©ä¾¡ããã¨ã©ããªãã§ããããï¼ ã¡ãã£ã¨èª¿ã¹ã¦ã¿ãã¨ä¸è¨ã®ããã«æ¸ããã¦ããè¨äºãè¦ã¤ãããã¨ãã§ãã¾ããã
ãã ãããã ã¨å®éç¨æã«ã¦ã¼ã¶ãä½ãè¦ãããã¦ãããã«ãããã¤ã¢ã¹ãããã£ã¦ãã¾ãã¾ãã ä¾ãã°ã¦ã¼ã¶ãæ¨è¦ãã¸ã㯠X ãè¦ã¦ã¢ã¯ã·ã§ã³ãããã¨ã«ããå¾ããããã°ã§ãã£ãå ´åãã¢ã¯ã·ã§ã³ã®ãã£ãã¢ã¤ãã ãã¤ã¾ãæ¨è¦ã§å½ã¦ããã¢ã¤ãã ã¯å½ç¶ X ã®åºåã«å«ã¾ããã¢ã¤ãã ã¨ãªãããããã X ã«è¿ããã¸ãã¯ãè¯ããã¸ãã¯ã§ããã¨è©ä¾¡ããããããªãã¾ãã レコメンデーションシステムのオフライン評価、どうやるんですか - froglog
ä¸è¨ã®èª¬æã®ããã«ãã¦ã¼ã¶ã¼ã«è¡¨ç¤ºãããã¢ã¤ãã ã®åè£ã¯ãã¹ã¦ãã¦ã¼ã¶ã¼ã«è¦ãããããã§ã¯ããã¾ãããå½ç¶ã©ã³ãã³ã°ä¸ä½ã®ã¢ã¤ãã ã¯ã¦ã¼ã¶ã¼ã®ç®ã«è§¦ãããããã¯ãªãã¯ãè³¼å ¥ãªã©ã«ç¹ãããããã§ãã
ä¸æ¹ãã¢ã«ã´ãªãºã ã®ä¿®æ£ã«ãã£ã¦ãæ°ããä¸ä½ã«åºã¦ããã¢ã¤ãã ããã£ãå ´åããã®ã¢ã¤ãã ã¯ãã¨ãã¨ã©ã³ãã³ã°ãä½ãããªã¢ã¯ã·ã§ã³ããããã°ãæ®ã£ã¦ããªãå¯è½æ§ãé常ã«é«ãã§ãã ãã®ã¾ã¾ä¸¡è ã®ã©ã³ãã³ã°ãè©ä¾¡ãã¦ãã¾ãã¨ç¾è¡ã®ã©ã³ãã³ã°ã¢ã«ã´ãªãºã ã«æå©ãªè©ä¾¡ã¨ãªã£ã¦ãã¾ããæ¬æ¥ãªãåªããã¢ã«ã´ãªãºã ã«ä¿®æ£ããã¦ããã¨ãã¦ããã®ä¾¡å¤ã誤ã£ã¦å¤æãã¦ãã¾ãããã¾ããã
Replayæ¨å®é
ãã¦ãåé¡æèã大ä½ããã£ãã¨ããã§ãæ¬é¡ã®Replayæ¨å®éã«ã¤ãã¦è¦ã¦ããããã¨æãã¾ãã
Replayæ¨å®éèªä½ã¯ããªãæããããææ³ã§ãWSDM 2011ã®"Unbiased offline evaluation of contextual-bandit-based news article recommendation algorithms"ã¨ããè«æ*1ã§ææ¡ãããææ³ã®ããã§ãã
å®éã«å°å ¥ãã¦ããäºä¾ã§ããã¨ãNetflixã®ããã°ã§ãç´¹ä»ããã¦ãããéå»ã«ã¯å®éã«ä½¿ç¨ããã¦ããããã§ããï¼ä»ã¯ã©ããªææ³ã使ã£ã¦ãã®ãã¯ãããã¾ããâ¦ï¼
èãæ¹
â»ãã®è¾ºã®è§£éãå人çãªç解ãªã®ã§ééã£ã¦ããTwitterã®DMã¨ãã§æãã¦ããã ããã°ã¨æãã¾ãã
ãã¾åé¡ã«ãªã£ã¦ããã®ã¯ãçæ¹ã®ã¢ã«ã´ãªãºã ã«å¯¾ãã¦ã¯ãã°ãã¼ã¿ãååã«æ®ã£ã¦ãã¦ãä»æ¹ã®ã¢ã«ã´ãªãºã ã«ã¤ãã¦ã¯ãã°ãåå¨ããªããã¨ããããã¨ããæ¡ä»¶ãä¸åè¡¡ã«ãªã£ã¦ãããã¨ãåé¡ã«ãªã£ã¦ããããã§ãã
èãæ¹ã¨ãã¦ã¯ãä¸æ¹ã ããæå©ãªç¶æ³ã§ã¯ãªããäºãã«ä¸ååãªãã®ã³ã°ãããã¦ããç¶æ³ãä½ãããã«ãã¾ãã
Netflixã®ããã°ã®ä¾ã§ã¯ãé¨åçã«ãã°ãæ¡ç¨ãã¦ãã¾ãã
ãã®ä¾ã§ã¯ãã¹ããããä¸ã¤ã®ç¶æ³ãèãã¦ãã¾ãã ä¸æ®µã¯åã¦ã¼ã¶ã¼ã«å¯¾ãã¦ã¹ãããã«è¡¨ç¤ºãããã¢ã¤ãã ãã©ã³ãã ã«æ±ºå®ããä¸æ®µã¯åã¦ã¼ã¶ã¼ã«å¯¾ãã¦ã¹ãããã«è¡¨ç¤ºãããã¢ã¤ãã ãæ¨è¦ã¢ãã«ã«ãã£ã¦æ±ºãããã¦ãã¾ãã
ãã®ã¨ããä¸æ®µã¨ä¸æ®µã§è¡¨ç¤ºããã¦ããã¢ã¤ãã ãä¸è´ããã¨ãã ãã¤ã³ã¿ã©ã¯ã·ã§ã³ãæ¡ç¨ï¼å³ä¸ã§ã¯ä¸æ®µã赤丸ãåçãããªãã£ããç·ä¸¸ãåçãããäºãæå³ããï¼ããç°ãªã£ã¦ããå ´åã«ã¯ç¡è¦ãã¾ãã
ããã«ãããã©ã³ãã ã«ãã°ãéå¼ãããã«ãªã£ã¦ããã¿ããã§ããï¼ããã¾ãèªä¿¡ãªãï¼
ã¢ã«ã´ãªãºã ã®ç¢ºèª
ãã¡ãã®æ¸ç±ã§ç¢ºèªããã¨ããããªæãã§è¨ç®ãããããã§ãã
- t=1ããTã¾ã§ãã¬ã³ã¼ããåå¾ãã以ä¸ãå®è¡ãã
- hã使ç¨ãã¦åè£ã¢ã¤ãã ãé¸æãã. ããªãã¡. ããã§, ã¯é¸æãããã¢ã¤ãã ã§ãã
- ãªãã°, å ±é ¬ãå«ãã. ããã§, ã¯ã¬ã³ã¼ãã®éã¿ã§ãããå¾ã§æ±ºå®ãã
- ã®å ´å, ãã®ã¬ã³ã¼ãã¯ç¡è¦ããã
- ç²å¾å ±é ¬ã®åè¨ãTã§å²ã£ãå¤ãè¿ã
ãã®æé ã§ãã£ã¦ã¿ããã¨ã«ãã¾ãã
ã¾ãã¯ä½ãèããã«å¤±æãã¦ã¿ã
ã¨ãããããä½ãèãã失æãã¦ã¿ã¾ãã ãããæãä¾ã¨ãã¦ãã¢ã¤ãã ãé ä¿¡ããã¹ãããã1ã¤ããç¶æ³ãèãã¾ãã ããã«10種é¡ã®ã¢ã¤ãã ãé ä¿¡ããç¶æ³ãèãã¾ãã ããã«å¯¾ãã¦ãã©ã³ãã ã«ã¢ã¤ãã ãé ä¿¡ãããã¨ãèãã¾ãã
è©ä¾¡ææ¨ã¯é©åçã使ã£ã¦ãã¾ãã ãã®å ´åããã¨ã®ãã°ã§ã¯precision=0.2ã«ãªã£ã¦ãããã®ããæ°ããä½ã£ãã¢ãã«ï¼ä¸èº«ã¯å ¨ãåãï¼ã§ã¯precision=0.02ã«ãªã£ã¦ãã¾ã£ã¦ãã¾ãã åãæ¨è¦ã¢ã«ã´ãªãºã ï¼ã©ã³ãã ï¼ã使ç¨ãã¦ããã®ã«ãå¤ã大ããå¤ãã£ã¦ãã¾ã£ã¦ãã¾ãã
ãã£ã¦ã¿ã
次ã«replayæ¨å®éããã£ã¦ã¿ããã¨æãã¾ãã
ã³ã¼ããæ¸ãã¨ãããªæãã
ãã®ä¾ã§ã¯ã2åã®é©åçã¯å¤§ä½ä¼¼ããããªå¤ï¼1åç®:precision=0.19, 2åç®:precision=0.21ï¼ã«ãªã£ã¦ãã¾ãã®ã§ãæ£ãããªãã©ã¤ã³è©ä¾¡ã§ãã¦ãããã§ãã
ãã£ã¦ã¿ã¦ãããåé¡ç¹
replayæ¨å®éã§åé¡ã«ãªã£ã¦ããã®ã¯ãã¢ã¤ãã æ°ã大éã«ããç¶æ³ã§ã¯ããããã·ãã¥ã¬ã¼ã·ã§ã³èªä½ãé£ãããªãç¹ã§ãã
- æ¬æ¥å¾ããã¦ãããã°ã®ä»¶æ°: 100000
- å®éã«ä½¿ç¨ãã¦ãããã°ã®ä»¶æ°
- 1åç®ï¼9962
- 2åç®ï¼990
ããã§ã¯ã©ã³ãã ã«ã¢ã¤ãã ãããã¯ãã¦ä½ããããã°ã¨éå»ã®ãã°ãçªãåããããã¦ãããã§ãããã¢ã¤ãã ã®æ°ãå¤ããªãã«ã¤ãã¦ã2ã¤ã®ã©ã³ãã³ã°ã§ã¢ã¤ãã ãåè´ãã確çãä½ããªãã¾ãã ããã¨ãã·ãã¥ã¬ã¼ã·ã§ã³ã«ããã¦ã¹ã³ã¢ã®è¨ç®å¯¾è±¡ã«ãªãé¨åãå°ãªããªãã®ã§ããã®å大éã®éå»ã®ãã°ãã¼ã¿ã¨çªãåãããå¿ è¦ãåºã¦ãã¦è¨ç®éãè¨å¤§ã«ãªã£ã¦ãã¾ãã¾ãã
è¦ããã«ãæ¨è¦ãããã¢ã¤ãã ãã¼ã«ããããã大ããªå ´åã«ã¯ãã®ææ³ã§ãªãã©ã¤ã³è©ä¾¡ãããã®ã¯é£ãããã§ãã éã«ã¢ã¤ãã ãã¼ã«ãå°ããå ´åã«ã¯ããã§ãååãã¾ãããããã§ãã
åèæç®
ææ³
æ£ç´ãã®è¾ºã«ã¤ãã¦ã¯ä»ã§ãæ§ã ãªç 究ãããã¦ããããã¤Reply methodèªä½10å¹´ã»ã©åã®è«æãªã®ã§ãä»ã§ã¯ããã¡ãã£ã¨é²ãã ææ³ããã£ãããã¾ãã
ãã®ã¸ãã«ã¤ãã¦ã¯ãåå¼·ãããã¾ãè¨äºãæ¸ãã¦ã¿ããã¨æãã¾ãã(ããã¨ã¯ãã£ã¦ãªã)