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
生成AIとAWS CDKで実現! 自社ブログレビューの効率化
ymae
2
330
小規模に始めるデータメッシュとデータガバナンスの実践
kimujun
3
590
分布で見る効果検証入門 / ai-distributional-effect
cyberagentdevelopers
PRO
4
700
【若手エンジニア応援LT会】AWSで繋がり、共に成長! ~コミュニティ活動と新人教育への挑戦~
kazushi_ohata
0
180
[AWS JAPAN 生成AIハッカソン] Dialog の紹介
yoshimi0227
0
150
よくわからんサービスについての問い合わせが来たときの強い味方 Amazon Q について
kazzpapa3
0
220
ネット広告に未来はあるか?「3rd Party Cookie廃止とPrivacy Sandboxの効果検証の裏側」 / third-party-cookie-privacy
cyberagentdevelopers
PRO
1
130
急成長中のWINTICKETにおける品質と開発スピードと向き合ったQA戦略と今後の展望 / winticket-autify
cyberagentdevelopers
PRO
1
160
Shift-from-React-to-Vue
calm1205
3
1.3k
AWS re:Inventを徹底的に楽しむためのTips / Tips for thoroughly enjoying AWS re:Invent
yuj1osm
1
560
visionOSでの空間表現実装とImmersive Video表示について / ai-immersive-visionos
cyberagentdevelopers
PRO
1
110
最速最小からはじめるデータプロダクト / Data Product MVP
amaotone
5
730
Featured
See All Featured
Designing the Hi-DPI Web
ddemaree
280
34k
Raft: Consensus for Rubyists
vanstee
136
6.6k
The Success of Rails: Ensuring Growth for the Next 100 Years
eileencodes
43
6.6k
Build The Right Thing And Hit Your Dates
maggiecrowley
32
2.4k
ReactJS: Keep Simple. Everything can be a component!
pedronauck
664
120k
How GitHub (no longer) Works
holman
311
140k
Designing for humans not robots
tammielis
249
25k
Keith and Marios Guide to Fast Websites
keithpitt
408
22k
Refactoring Trust on Your Teams (GOTO; Chicago 2020)
rmw
31
2.7k
Practical Tips for Bootstrapping Information Extraction Pipelines
honnibal
PRO
9
680
GraphQLの誤解/rethinking-graphql
sonatard
66
9.9k
実際に使うSQLの書き方 徹底解説 / pgcon21j-tutorial
soudai
167
49k
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