ä¼å¡äºæ¥é¨ã¨ã³ã¸ãã¢ã®ä½è¤ã§ããã¯ãã¯ãããã§ã¯æ¥ã ãã¼ã¿ã¨åãåãããã¼ã¿ãåºã«ããæ½çä½ãã«é¢ãã£ã¦ãã¾ãã
Cookpad TechConf 2018ã§æ°äºãçºè¡¨ãããã¯ãã¯ãããã® "ä½ç³»ç" ãµã¼ãã¹éçºãã®ä¸ã§ã社å ã§ä»®èª¬æ¤è¨¼ãè¡ãéã«ä½¿ããã¦ãããã¼ã«ã«ã¤ãã¦è§¦ãã¦ããç®æãããã¾ããã æ¬è¨äºã§ã¯ãã®ãã¼ã«ã¨å®éã®åçµã¿æ¹ã«ã¤ãã¦ãå®éã®æµããè¸ã¾ããªããããå°ã詳ãã説æãã¦ããã¾ãã
仮説æ¤è¨¼
仮説æ¤è¨¼ã¯ä»¥ä¸ã®ããã¼ã§é²ãã§ããã¾ãã
- åææ¡ä»¶ã確èªãã
- æ¤è¨¼ã®è¨è¨ããã
- åãã¿ã¼ã³ã®æ©è½ãå®è£ ãã
- åãã¿ã¼ã³ã«ãã°ãä»è¾¼ã
- ãããã¤å¾ã®ç£è¦
- æ¤è¨¼çµæã®æ¯ãè¿ãã¨ãã¯ã¹ãã¢ã¯ã·ã§ã³
å°ããã»ææ»ããªãã»é«éãªæ¤è¨¼ãè¡ãããã«ã¯æãåããåã®æ®µéãä¸è¨ããã¼ã«ããã1ã»2ã®ã¹ããããéè¦ã¨ãªãã¾ãã
å ·ä½ä¾ã¨ãã¦ãæã¨å¤ã¯ãã¬ãã¢ã ç®ç«ã®éè¦ãé«ã¾ããã¨ãã仮説ã®æ¤è¨¼ããã¼ãè¦ã¦ããã¾ãã ããã¯ç®ç«ã¨ãã¬ãã¢ã ç®ç«ã®ã¢ã¯ã»ã¹åå¸ãã¿ãã¨æã¨å¤ã«ãã¢ã¯ã»ã¹ãå¢å ãã¦ãããã¨ããå¾ã仮説ã§ãã
åææ¡ä»¶ã確èªãã
ä¸è¨ã®2ã¤ã®ç¹ã«ã¤ãã¦åæãåãã¦ããå¿ è¦ãããã¾ãã
- 確ãããã価å¤ï¼ä»®èª¬ï¼ãæ確åããã¦ãã
- ãã®æ¤è¨¼ã«A/Bãã¹ããç¨ãã
ä»åã¯è©±ããããããããããããæã¨å¤ã¯ãã¬ãã¢ã ç®ç«ã®éè¦ãé«ã¾ããã¨ãã仮説ãæ¢ã«ãã£ã¦ããããããA/Bãã¹ãã§ç¢ºãããã¨ããæµãã«ãªãã¾ããã§ããå®éã«ã¯ãããã仮説ãæ¤è¨¼å¯è½ãªç¶æ ã«ã¾ã§æ確åããã¦ããªãã¨ãã£ãç¶æ³ãèãããã¾ãã æ段ãå ·ä½åããåã«ãã¼ã ã§æ¹é決å®ã»åæå½¢æããªããã°æ¤è¨¼ã¯å§ã¾ãã¾ããã ããå½ããåã®ããã«æãã¾ããããã¤ã§ãæ¯ãæ¿ããããããåå°ãåºãã¦ãããã¨ã大äºã§ãã
æ¤è¨¼ã®è¨è¨ããã
仮説ã確ãããããã«A/Bãã¹ãã®è¨è¨ãè¡ãã¾ãã ã¾ãã仮説ã確ãããããã«ä½ã¨ä½ãæ¯è¼ãããèãã¾ãã ãã®è¨äºã§ä¾é¡ã¨ãã¦æ±ã仮説ã¯ãæã¨å¤ã¯ãã¬ãã¢ã ç®ç«ã®éè¦ãé«ã¾ããã¨ãã仮説ã§ããã åæç¥èã¨ãã¦äººæ°é æ¤ç´¢ã¨ãã¬ãã¢ã ç®ç«ã§ã¯äººæ°é æ¤ç´¢ã®æ¹ãéè¦ããããåç´ã«äººæ°é æ¤ç´¢ã®æ ããã¬ãã¢ã ç®ç«ã«å·®ãæ¿ãã¦æ¯è¼ããã¨åè ãæå¹ã§ãããã¨ãããã£ã¦ããã¨ãã¾ãã ãã£ã¦ãä»åã¯ãæ®æ®µã¯äººæ°é æ¤ç´¢ã§ã®è¨´æ±ã«ä½¿ã£ã¦ããæ ãæã¨å¤ã®æéã«ã ããã¬ãã¢ã ç®ç«ã«åãæ¿ãããæ½çã«åãçµã¿ã¾ãã
- ãã¿ã¼ã³A: 人æ°é æ¤ç´¢ï¼é常ï¼
- ãã¿ã¼ã³B: æã¨å¤ã ããã¬ãã¢ã ç®ç«ããã以å¤ã®æé帯ã¯äººæ°é æ¤ç´¢
ãã¿ã¼ã³A | ãã¿ã¼ã³B |
---|---|
ãã®æã対象ãåºæ¥ãéãæ確ã«ãã¦ããã¾ãã ä»åã¯ãµã¤ãå ã®è©²å½é¨åã訪ãããã¬ãã¢ã ä¼å¡ä»¥å¤ã®å ¨ã¦ã®ã¦ã¼ã¶ã¼ã対象ã¨ãããã¨ã«ãã¾ãã ã¾ããæ¤è¨¼ã®çµæãã©ããªã£ããã«ãã£ã¦æ¬¡ã«ã¨ãã¢ã¯ã·ã§ã³ã¾ã§æ±ºãã¾ãã
次ã«A/Bãã¹ãã§ç£è¦ã»æ¯è¼ãããKPIãè¨å®ãã¾ããä»åã¯ãã¬ãã¢ã ãµã¼ãã¹ä¼å¡ã®è»¢æçï¼CVRï¼ãKPIã¨ãã¾ãã KPIã決å®ãããã¨ã§åæã«å ·ä½çãªãã°ã®æ¸¬å®ç®æã¨æ¸¬å®å 容ã決å®ãã¾ãã ä»åã¯ããããã®ãã¿ã¼ã³ã«ããã訪åã¦ã¼ã¶ã¼æ°ã¨ãã¬ãã¢ã ãµã¼ãã¹ã¸ã®è»¢ææ°ãå¿ è¦ã¨ãªãã¾ãã
ããã§æ¤è¨¼æéã®è¦ç©ãããè¡ããããå¿ è¦ã¨ãªããµã³ãã«ãµã¤ãºãç®åºãã¦ããã¾ãã ãµã³ãã«ãµã¤ãºã®ç®åºã«ã¯ãA/B両ãã¿ã¼ã³ã®å¹³åå¤ãã¨ãæ±ãã確度ããäºåã«æ±ºãã¦ããå¿ è¦ãããã¾ãã è¨ãæ¹ãå¤ããã¨ãã©ãã ãã®æ¹åã確èªãããã®ããã¨ãã©ãã ãå¶ç¶ãæé¤ãããããã¨ããç¹ã§ãã çµ±è¨å¦ã§ã¯åè ãå¹æéãå¾è ãæææ°´æºã¨æ¤åºåã¨å¼ã³ã¾ãã 詳ããã¯ã仮説æ¤è¨¼ã¨ãµã³ãã«ãµã¤ãºã®åºç¤ãã御覧ãã ããã ããããåºã«ãã¦ãµã³ãã«ãµã¤ãºãè¨ç®ãããµã³ãã«ãµã¤ãºã¨ç¾ç¶ã®UUããä»åã®ä»®èª¬æ¤è¨¼ã«å¿ è¦ã¨ããæ¥æ°ãæ±ãã¾ãã
ããã¦æ¤è¨¼è¨è¨ã®æå¾ã«ãæ¤è¨¼æéãçµéããæç¹ã§ã©ãããçµæã ã£ããã©ãããã¨ãããã¨ã決ãã¦ããã¾ãã å®éã«æãåããåã«ãæçµçãªçµæã大éæã«å ´ååããã¦æ¬¡ã®è¡åã決ãã¦ãããã¨ãææ»ãã®é²æ¢ã«ã¤ãªããã¾ãã
両ãã¿ã¼ã³ãå®è£ ãã
ãã¿ã¼ã³Aã«ã¯å¾æ¥éãã®æåãããã¿ã¼ã³Bã«ã¯æé帯ã«ãã£ã¦æ å 表示ãå¤ããããã«å®è£ ããã¾ãã ãã®éããããã¿ã¤ãéçºç¨ãã©ã°ã¤ã³ã§ãããChankoãã¨Chankoã®A/Bãã¹ãç¨æ¡å¼µã§ãããEasyAbãã使ããã¨ã§ä¸è¨ã®ããã«æ¸ããã¨ãã§ãã¾ãã
ãã¿ã¼ã³ã®å¶å¾¡ãè¡ãChankoå é¨ã®ã³ã³ããã¼ã©ã¼
module TimeSlotPsKondate include Chanko::Unit include EasyAb split_test.add('default', partial: 'default_view') split_test.add('time_slot_ps_kondate', partial: 'time_slot_ps_kondate_view`') split_test.log_template('show', 'ab_test.time_slot_ps_kondate.[name].show') split_test.log_template('click', 'ab_test.time_slot_ps_kondate.[name].click') split_test.define(:card) do next run_default if premium_service_user? # ãã¬ãã¢ã ãµã¼ãã¹ã¦ã¼ã¶ã¼ã¯å¯¾è±¡ã¨ããªã ab_process.log('show') # 訪åã¦ã¼ã¶ã¼æ°ã«ã¦ã³ãç¨ãã° render ab_process.fetch(:partial), time_slot: target_time? end end
ãã¿ã¼ã³ã®å·®ãæ¿ããè¡ãChankoå¤é¨ã®viewãã¡ã¤ã«ï¼hamlï¼
-# 対象ã¨ãªãviewã®æ¸ããã¦ãããã¡ã¤ã« = invoke(:time_slot_ps_kondate, card) do -# å·®ãæ¿ãé¨å end
ãããã«å ãããã¼ã·ã£ã«ã¨ãã¦å¿
è¦ã¨ãªã default_card.haml
㨠time_slot_ps_kondate_card.haml
ã¨CSSã追å ããã°å®è£
ã¯å®äºã§ãã
æ¢åã³ã¼ãã¨ã®æ¥ç¹ã¯invoke
ã¡ã½ããã®é¨åã®ã¿ã§ãããããA/Bãã¹ãã®on/offã¯ããããããªå¤æ´ã§å¶å¾¡ãããã¨ãã§ãã¾ãã
Chankoã¯æ¢åã®ã³ã¼ãã¨åãé¢ãããå ´æã«ç½®ããããããæ¤è¨¼ã®å¾å§æ«ãã¹ã ã¼ãºã«è¡ãã¾ãã
ãã®ããã«ãChankoã¨EasyAbã使ããã¨ã§å¿ è¦æä½éã®ã³ã¼ãã®ã¿ã§æ¤è¨¼ãè¡ãã¾ãã
両ãã¿ã¼ã³ã«ãã°ãä»è¾¼ã
ä»åã¯CVRãKPIã¨ãã¦è¿½ãããã¦ããå¿ è¦ãããã¾ãã ä¸è¦ãªãã°ã大éã«ã¨ã£ã¦ãä»æ¹ããªãã®ã§ãã°ã¯å¿ è¦æä½éã«çããã¹ãã§ãããå¾ã«ãªã£ã¦ããã®ãã°ãã¨ã£ã¦ããã°ããã£ããã¨å¾æãã¦ãé ãããå¿ è¦ãªãã°ã«æãæ¼ãããªãããåæãã¦ããã¾ãã ä»åã¯è©²å½é¨åã®ãã¼ã¸ã«è¨ªãã人ï¼showï¼ã¨ãã¬ãã¢ã ãµã¼ãã¹æ ãã¯ãªãã¯ãã人ï¼clickï¼ã®ãã°ãåãã¾ãã å®éã«CVRãåãã«ã¯åè ã ãã§ååãªã®ã§ãããå¾è ã®ãã°ãã¨ã£ã¦ãããã¨ã§CTRãç®åºã§ããããã«ãªããã¯ãªã¨ã¤ãã£ãã«åé¡ããã£ããã©ããæ¯ãè¿ãã®ã«å½¹ç«ã¡ã¾ãã
A/Bãã¹ãã«éããä¸æçãªãã°ããµãµãã¨ä»è¾¼ã¿ããå ´åã社å ã§ã¯KPI管çãã¼ã«ãHakari2ãã使ã£ã¦ãã¾ãã Rubyã»JavaScriptã»HTMLããããã§å©ç¨ãããã¨ãã§ãã¾ãã
Ruby
Hakari2Logger.post("ab_test.hakari_log.ruby.A", user: user, request: request)
JavaScript
hakari2.post(['ab_test.hakari_log.javascript.A'])
HTMLï¼hamlã§æ¸ããå ´åï¼
= link_to xx_path, class: 'track_hakari2', data: { hakari2_keywords: 'ab_test.hakari_log.html.A' }
ãã®ããã«ãã¦ã¯ã©ã¤ã¢ã³ãå´ã§ã»ããããããã°ã¯å ±éãã°åºç¤Figlogãçµç±ããæçµçã«DWHãã¼ã ã®ç®¡çããRedshiftå ã¸æ ¼ç´ããã¾ãã A/Bãã¹ããéå§ããå¾ããã°ã®ç£è¦ãåæãè¡ãæã«ã¯ãã®ãã°ãä»ã®ãã¼ã¿ã¨çµã¿åããã¦å©ç¨ãã¾ãã ä»åã®æ¤è¨¼ã§å¿ è¦ã¨ãªãCVRã¯showã®ãã°ã¨ãã¬ãã¢ã ä¼å¡ç»é²ã®ãã°ãçµåãããã¨ã§æ±ã¾ãã¾ãã
ãããã¤å¾ã®ç£è¦
A/Bãã¹ãç¨ã®å®è£ ããããã¤ããå ¬éããå¾ã«å®è£ ããã°åå¾ã«ãã¹ããªãã確èªãããå¿ è¦ãããã¾ãã æ¥æ¬¡ã®éè¨çµæãªã©ã¯cookpadã®ç®¡çç¨ã¢ããªã±ã¼ã·ã§ã³ãpapaãä¸ã®ããã·ã¥ãã¼ãã§ç¢ºèªã§ãã¾ãã æ¤è¨¼æéå¾ã®æçµçãªæ¤è¨¼çµæããã¡ãã§ç¢ºèªãã¾ãã
æ¤è¨¼çµæã®æ¯ãè¿ãã¨ãã¯ã¹ãã¢ã¯ã·ã§ã³
ã仮説æ¤è¨¼ã®è¨è¨ããããã®æ®µéã§ããããã決ãã¦ãããç®æ¨ãµã³ãã«ãµã¤ãºã«å°éããã¨ããã§æ¤è¨¼ãçµãã¾ãã ãã®æç¹ã§å度ããã·ã¥ãã¼ãã確èªããä»åã®æ½çã®çµæãã©ãã§ãã£ãããçµè«ã¥ãã¾ãã
ããã·ã¥ãã¼ãã§ã¯éè¨å¤ã ãã§ãªããæ°å¤ããã¨ã«ãã¦æããã確çåå¸ãè¨æ¸¬æéä¸ã®æ¨ç§»ãè¦ããã¨ãã§ãã¾ãã ããããã¿ããã¨ã§ææå·®ããããããã©ãããç¹å®æ¥æã®ã¤ãã³ãã«ããå½±é¿ããªããã©ããã確èªãã¾ãã
確çåå¸ | æç³»åå¤å |
---|---|
ãã®ã¹ãããã§ã¯ç¥è¦ãå¾ãããã®èå¯ãè°è«ãè¡ãã¾ããããã»ã©æ³å®å¤ã®çµæã«ãªããªãéããæ¤è¨¼ã®è¨è¨ãã§æ±ºããæ¹éã«å¾ã次ã®è¡åã決å®ãã¾ãã ãã®æ½çã«é¢ãã¦ã¯å½åæ³å®ãã¦ããéã®æ¹åãå¾ãããªãã£ãããã仮説ã®æ£ããã証æããçµæãå¾ããã¾ããã§ããã ãã®ä»®èª¬ã¯ç®ç«ã¨ãã¬ãã¢ã ç®ç«ã®ã¢ã¯ã»ã¹åå¸ããå¾ã仮説ã§ãããããã®ä»®èª¬ãå¾ãéç¨ãã¢ããã¼ãæ¹æ³ããè¦ç´ãå¿ è¦ãããã¾ãã
ã¾ã¨ã
ã¯ãã¯ãããã§é«éã«ä»®èª¬ãæ¤è¨¼ããããã«æ®æ®µè¡ã£ã¦ããä½æ¥ã«ã¤ãã¦ã話ãã¾ããã 6ã¹ãããã«åãã¦èª¬æããã¦ãã¾ãããããåææ¡ä»¶ã®ç¢ºèªãã¨ãæ¤è¨¼ã®è¨è¨ãã¾ã§ãããã³ã¨ããªãã¦ããã°ãã®å¾ã¯ç¹ã«èãããã¨ãªãå®è¡ãããã¨ãã§ãã¾ãã ãã®ãµã¤ã¯ã«ãåãä½æ¥ã«æ £ãã¦ãããã¨ã§ãå®éã«æãåããä½æ¥ããããµã¼ãã¹æ¹åã®ããã«ã©ãããã¹ããé ã使ãä½æ¥ã¸å´åãå²ããã¨ãã§ããããã«ãªãã¾ãã
ã¾ããä»åã¯webã§ã®A/Bãã¹ãã®èª¬æããã¾ããããiOS/Androidã§ãåæ§ã«A/Bãã¹ãç¨ã®ãã¼ã«ãå©ç¨ãããã¨ã§æ軽ã«ä»®èª¬æ¤è¨¼ãè¡ããã¨ãã§ãã¾ãã
ã¯ãã¯ãããã§ã¯æ¥ã ãã®ããã«å種ãã¼ã«ãå©ç¨ãã¦ãµã¼ãã¹æ¹åã®ãµã¤ã¯ã«ãé«éã«ã¾ããã¦ãã¾ãã