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
84
社内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
330
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
インフラとバックエンドとフロントエンドをくまなく調べて遅いアプリを早くした件
tubone24
1
430
IBC 2024 動画技術関連レポート / IBC 2024 Report
cyberagentdevelopers
PRO
1
110
Taming you application's environments
salaboy
0
200
OCI 運用監視サービス 概要
oracle4engineer
PRO
0
4.8k
日経電子版のStoreKit2フルリニューアル
shimastripe
1
140
誰も全体を知らない ~ ロールの垣根を超えて引き上げる開発生産性 / Boosting Development Productivity Across Roles
kakehashi
1
230
SREが投資するAIOps ~ペアーズにおけるLLM for Developerへの取り組み~
takumiogawa
1
450
OS 標準のデザインシステムを超えて - より柔軟な Flutter テーマ管理 | FlutterKaigi 2024
ronnnnn
1
280
『Firebase Dynamic Links終了に備える』 FlutterアプリでのAdjust導入とDeeplink最適化
techiro
0
140
Introduction to Works of ML Engineer in LY Corporation
lycorp_recruit_jp
0
140
Lambda10周年!Lambdaは何をもたらしたか
smt7174
2
110
ExaDB-D dbaascli で出来ること
oracle4engineer
PRO
0
3.9k
Featured
See All Featured
Faster Mobile Websites
deanohume
305
30k
Statistics for Hackers
jakevdp
796
220k
Java REST API Framework Comparison - PWX 2021
mraible
PRO
28
8.2k
Thoughts on Productivity
jonyablonski
67
4.3k
10 Git Anti Patterns You Should be Aware of
lemiorhan
655
59k
What’s in a name? Adding method to the madness
productmarketing
PRO
22
3.1k
The Invisible Side of Design
smashingmag
298
50k
Speed Design
sergeychernyshev
25
620
Adopting Sorbet at Scale
ufuk
73
9.1k
A Tale of Four Properties
chriscoyier
156
23k
Site-Speed That Sticks
csswizardry
0
28
RailsConf & Balkan Ruby 2019: The Past, Present, and Future of Rails at GitHub
eileencodes
131
33k
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