Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
データサイエンティストに同じクエリは二度も通じぬ
Search
Takahiro Yoshinaga
December 07, 2019
Technology
2
910
データサイエンティストに同じクエリは二度も通じぬ
Presentation in Japan.R 2019
Takahiro Yoshinaga
December 07, 2019
Tweet
Share
More Decks by Takahiro Yoshinaga
See All by Takahiro Yoshinaga
ビッグデータビジネスによる継続的な価値創造と人材育成
yoshinaga0106
0
82
社内LINE公式アカウント メッセージ送りすぎ問題を データサイエンスで解決する
yoshinaga0106
0
160
[ICML2021 論文読み会] A General Framework For Detecting Anomalous Inputs to DNN Classifiers
yoshinaga0106
0
1.4k
Data Science API
yoshinaga0106
5
2.5k
Anomaly Detection in KDD2019
yoshinaga0106
1
320
Data Engineering & Data Analysis #8
yoshinaga0106
1
2.4k
Conversion Prediction Using Multi-task Conditional Attention Networks to Support the Creation of Effective Ad Creatives
yoshinaga0106
0
1.3k
Introduction of Clumpiness
yoshinaga0106
0
120
データにまつわる苦労話から考えるデータ活用
yoshinaga0106
0
120
Other Decks in Technology
See All in Technology
独自ツール開発でスタジオ撮影をDX!「VLS(Virtual LED Studio)」 / dx-studio-vls
cyberagentdevelopers
PRO
1
180
物価高なラスベガスでの過ごし方
zakky
0
380
Forget efficiency – Become more productive without the stress
ufried
0
130
最速最小からはじめるデータプロダクト / Data Product MVP
amaotone
5
740
AWS re:Inventを徹底的に楽しむためのTips / Tips for thoroughly enjoying AWS re:Invent
yuj1osm
1
570
いまならこう作りたい AWSコンテナ[本格]入門ハンズオン 〜2024年版 ハンズオンの構想〜
horsewin
9
2.1k
使えそうで使われないCloudHSM
maikamibayashi
0
170
WINTICKETアプリで実現した高可用性と高速リリースを支えるエコシステム / winticket-eco-system
cyberagentdevelopers
PRO
1
190
プロダクトチームへのSystem Risk Records導入・運用事例の紹介/Introduction and Case Studies on Implementing and Operating System Risk Records for Product Teams
taddy_919
1
170
グローバル展開を見据えたサービスにおける機械翻訳プラクティス / dp-ai-translating
cyberagentdevelopers
PRO
1
150
「 SharePoint 難しい」ってよく聞くけど、そんなに言うなら8歳の息子に試してもらった
taichinakamura
1
620
ExaDB-D dbaascli で出来ること
oracle4engineer
PRO
0
3.6k
Featured
See All Featured
The Invisible Side of Design
smashingmag
297
50k
The MySQL Ecosystem @ GitHub 2015
samlambert
250
12k
A Tale of Four Properties
chriscoyier
156
23k
Adopting Sorbet at Scale
ufuk
73
9k
Reflections from 52 weeks, 52 projects
jeffersonlam
346
20k
Ruby is Unlike a Banana
tanoku
96
11k
KATA
mclloyd
29
13k
How to Create Impact in a Changing Tech Landscape [PerfNow 2023]
tammyeverts
46
2.1k
Responsive Adventures: Dirty Tricks From The Dark Corners of Front-End
smashingmag
250
21k
A Modern Web Designer's Workflow
chriscoyier
692
190k
Unsuck your backbone
ammeep
668
57k
Rails Girls Zürich Keynote
gr2m
93
13k
Transcript
2019/12/7 Takahiro Yoshinaga, LINE Corporation
© 2015 KURUMADA PRODUCTION
@t_yoshinaga0106 Takahiro Yoshinaga aE l l , l hi RE
S R E s l e t a t o l l / BL cDn IPN
!
# , , cost, impression Web service df #>
gender age cost impression click conversion #> 1 M 10 51 101 0 0 #> 2 F 20 52 102 3 1 #> 3 M 30 53 103 6 2 #> 4 F 40 54 104 9 3 #> 5 M 50 55 105 12 4 #> 6 F 60 56 106 15 5 #> 7 M 70 57 107 18 6 #> 8 F 80 58 108 21 7 #> 9 M 90 59 109 24 8 #> 10 F 100 60 110 27 9 Sample # !" !
:
dplyr # Summarize by gender df_summarized_gender <- df %>% group_by(gender)
%>% summarize( cost = sum(cost), impression = sum(impression), click = sum(click), conversion = sum(conversion), ctr = sum(click) / sum(impression), cvr = sum(conversion) / sum(click), ctvr = sum(conversion) / sum(impression), cpa = sum(cost) / sum(conversion), cpc = sum(cost) / sum(click), ecpm = sum(cost) / sum(impression) * 1000 ) df_summarized_gender #> # A tibble: 2 x 11 #> gender cost impression click conversion ctr cvr ctvr cpa cpc ecpm #> <fct> <int> <int> <dbl> <int> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> #> 1 F 280 530 75 25 0.142 0.333 0.0472 11.2 3.73 528. #> 2 M 275 525 60 20 0.114 0.333 0.0381 13.8 4.58 524. # Summarize by age df_summarized_age <- df %>% group_by(age) %>% summarize( cost = sum(cost), impression = sum(impression), click = sum(click), conversion = sum(conversion), ctr = sum(click) / sum(impression), cvr = sum(conversion) / sum(click), ctvr = sum(conversion) / sum(impression), cpa = sum(cost) / sum(conversion), cpc = sum(cost) / sum(click), ecpm = sum(cost) / sum(impression) * 1000 ) df_summarized_age #> # A tibble: 10 x 11 #> age cost impression click conversion ctr cvr ctvr cpa cpc ecpm #> <dbl> <int> <int> <dbl> <int> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> #> 1 10 51 101 0 0 0 NaN 0 Inf Inf 505. #> 2 20 52 102 3 1 0.0294 0.333 0.00980 52 17.3 510. #> 3 30 53 103 6 2 0.0583 0.333 0.0194 26.5 8.83 515. #> 4 40 54 104 9 3 0.0865 0.333 0.0288 18 6 519. #> 5 50 55 105 12 4 0.114 0.333 0.0381 13.8 4.58 524. #> 6 60 56 106 15 5 0.142 0.333 0.0472 11.2 3.73 528. #> 7 70 57 107 18 6 0.168 0.333 0.0561 9.5 3.17 533. #> 8 80 58 108 21 7 0.194 0.333 0.0648 8.29 2.76 537. #> 9 90 59 109 24 8 0.220 0.333 0.0734 7.38 2.46 541. #> 10 100 60 110 27 9 0.245 0.333 0.0818 6.67 2.22 545.
dplyr # Summarize by gender df_summarized_gender <- df %>% group_by(gender)
%>% summarize( cost = sum(cost), impression = sum(impression), click = sum(click), conversion = sum(conversion), ctr = sum(click) / sum(impression), cvr = sum(conversion) / sum(click), ctvr = sum(conversion) / sum(impression), cpa = sum(cost) / sum(conversion), cpc = sum(cost) / sum(click), ecpm = sum(cost) / sum(impression) * 1000 ) df_summarized_gender #> # A tibble: 2 x 11 #> gender cost impression click conversion ctr cvr ctvr cpa cpc ecpm #> <fct> <int> <int> <dbl> <int> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> #> 1 F 280 530 75 25 0.142 0.333 0.0472 11.2 3.73 528. #> 2 M 275 525 60 20 0.114 0.333 0.0381 13.8 4.58 524. # Summarize by age df_summarized_age <- df %>% group_by(age) %>% summarize( cost = sum(cost), impression = sum(impression), click = sum(click), conversion = sum(conversion), ctr = sum(click) / sum(impression), cvr = sum(conversion) / sum(click), ctvr = sum(conversion) / sum(impression), cpa = sum(cost) / sum(conversion), cpc = sum(cost) / sum(click), ecpm = sum(cost) / sum(impression) * 1000 ) df_summarized_age #> # A tibble: 10 x 11 #> age cost impression click conversion ctr cvr ctvr cpa cpc ecpm #> <dbl> <int> <int> <dbl> <int> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> #> 1 10 51 101 0 0 0 NaN 0 Inf Inf 505. #> 2 20 52 102 3 1 0.0294 0.333 0.00980 52 17.3 510. #> 3 30 53 103 6 2 0.0583 0.333 0.0194 26.5 8.83 515. #> 4 40 54 104 9 3 0.0865 0.333 0.0288 18 6 519. #> 5 50 55 105 12 4 0.114 0.333 0.0381 13.8 4.58 524. #> 6 60 56 106 15 5 0.142 0.333 0.0472 11.2 3.73 528. #> 7 70 57 107 18 6 0.168 0.333 0.0561 9.5 3.17 533. #> 8 80 58 108 21 7 0.194 0.333 0.0648 8.29 2.76 537. #> 9 90 59 109 24 8 0.220 0.333 0.0734 7.38 2.46 541. #> 10 100 60 110 27 9 0.245 0.333 0.0818 6.67 2.22 545. !? !?
%! $ # "
mmetrics GI EI - C l ü . : .
: A - . . / l - ü - .: C - . l : ü LD ND R l - : ü .: .: - : : : - C .
# metrics <- mmetrics::define( cost = sum(cost), impression = sum(impression),
click = sum(click), conversion = sum(conversion), ctr = sum(click) / sum(impression), cvr = sum(conversion) / sum(click), ctvr = sum(conversion) / sum(impression), cpa = sum(cost) / sum(conversion), cpc = sum(cost) / sum(click), ecpm = sum(cost) / sum(impression) * 1000) # axis df_summarized_gender <- mmetrics::add(df, gender, metrics = metrics) df_summarized_age <- mmetrics::add(df, age, metrics = metrics) Use Case of mmetrics
Result # df_summarized_gender #> # A tibble: 2 x
11 #> gender cost impression click conversion ctr cvr ctvr cpa cpc ecpm #> <fct> <int> <int> <dbl> <int> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> #> 1 F 280 530 75 25 0.142 0.333 0.0472 11.2 3.73 528. #> 2 M 275 525 60 20 0.114 0.333 0.0381 13.8 4.58 524. # df_summarized_age #> # A tibble: 10 x 11 #> age cost impression click conversion ctr cvr ctvr cpa cpc ecpm #> <dbl> <int> <int> <dbl> <int> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> #> 1 10 51 101 0 0 0 NaN 0 Inf Inf 505. #> 2 20 52 102 3 1 0.0294 0.333 0.00980 52 17.3 510. #> 3 30 53 103 6 2 0.0583 0.333 0.0194 26.5 8.83 515. #> 4 40 54 104 9 3 0.0865 0.333 0.0288 18 6 519. #> 5 50 55 105 12 4 0.114 0.333 0.0381 13.8 4.58 524. #> 6 60 56 106 15 5 0.142 0.333 0.0472 11.2 3.73 528. #> 7 70 57 107 18 6 0.168 0.333 0.0561 9.5 3.17 533. #> 8 80 58 108 21 7 0.194 0.333 0.0648 8.29 2.76 537. #> 9 90 59 109 24 8 0.220 0.333 0.0734 7.38 2.46 541. #> 10 100 60 110 27 9 0.245 0.333 0.0818 6.67 2.22 545.
© ,0%"/4)"-UE1VCMJTIFST