SlideShare a Scribd company logo
1 of 19
⼤坪 寛之
データサイエンス勉強会
〜効果検証と機械学習〜
はじめに
今回の勉強会では、我々の業務に近い“効果検証”を題材にして取り扱います。
「機械学習がテーマじゃないの︖なんで効果検証︖」と感じた⽅もいらっしゃると思います。
実は効果検証にも機械学習を活かせる場⾯は存在します。
今回は事例紹介⾵にお伝えするので、統計・AI知識は多少乱暴に扱います。
(ホントはあまり読めてない)
今回の内容は、最近読んでいる次の書籍から⼀部抜粋しました。
興味を持った⽅は、ぜひ書籍も読んでみてください。
参考︓効果検証⼊⾨〜正しい⽐較のための因果推論/計量経済学の基礎
https://www.amazon.co.jp/dp/B0834JN23Y/ref=dp-kindle-redirect?_encoding=UTF8&btkr=1
⽬次
1. その効果検証は適切ですか︖
・効果検証1
・効果検証2
2. 傾向スコアマッチングってなに︖
・よくやるコントロールの作り⽅
・傾向スコアを使ったコントロールの作り⽅
⽬次
1. その効果検証は適切ですか︖
2. 傾向スコアマッチングってなに︖
いきなりですが・・・
とあるデータを使って効果検証をしてみましょう
(皆さん電卓を⽤意︕︕)
メール配信した事による持ち上げ効果を計算してみてください。
10秒くらいでできるっすよね︖
問題(ででん︕︕)
ユーザーID 実際の売上 配信フラグ
1 300 0
2 600 1
3 600 1
4 300 0
5 300 0
6 600 1
平均値の差分を取ると・・・︖
計算してみよう
ユーザーID 実際の売上 配信フラグ
1 300 0
2 600 1
3 600 1
4 300 0
5 300 0
6 600 1
①配信層の平均売上 =(600円×3ユーザ) / 3ユーザ = 600円
②⾮配信層の平均売上=(300円×3ユーザ) / 3ユーザ = 300円
∴ 持ち上げ効果
= ① - ②
= 600円 - 300円 = 300円 ︕︕
メール配信した事による持ち上げ効果を計算してみてください。
(ごめんなさい︕ユーザーごとの売上パターンありました︕)
第2問(ででん︕︕)
ユーザーID 実際の売上 メール配信なし
のときの売上(0)
メール配信有り
のときの売上(1)
配信フラグ
1 300 300 400 0
2 600 500 600 1
3 600 500 600 1
4 300 300 400 0
5 300 300 400 0
6 600 500 600 1
メール配信した事による持ち上げ効果を計算してみてください。
(ごめんなさい︕ユーザーごとの売上パターンありました︕)
第2問(ででん︕︕)
ユーザーID 実際の売上 メール配信なし
のときの売上(0)
メール配信有り
のときの売上(1)
配信フラグ
1 300 300 400 0
2 600 500 600 1
3 600 500 600 1
4 300 300 400 0
5 300 300 400 0
6 600 500 600 1
なんとこれ、メールの持ち上げ効果100円です
あれれー︖
300円じゃなかったっけ︖
このメール配信に⼤きな効果がないこと伝わりました︖
ユーザーID 実際の売上 メール配信なし
のときの売上(0)
メール配信有り
のときの売上(1)
配信フラグ
1 300 300 400 0
2 600 500 600 1
3 600 500 600 1
4 300 300 400 0
5 300 300 400 0
6 600 500 600 1
メール配信実績に依らず
同⼀ユーザーでの売上差はすべて+100円
みなさまは適切な効果検証できてますか︖
効果検証を適切に⾏うためにも
⽐較層(≒コントロール層)の
作り⽅はとても重要︕
(詳しい話はwebで)
⼈のこと⾔えません、ごめんなさいごめんなさい
機械学習で⽐較層に対してなにかできるの︖
コントロール層の弱点を
機械学習でカバーしてみよう︕
(今回はイメージだけで説明)
⽬次
1. その効果検証は適切ですか︖
2. 傾向スコアマッチングってなに︖
コントロールは⽐較対象として適切︖
よくやるコントロールの作り⽅はこんな感じ
とあるサービスαを契約中
&前⽉の購⼊⾦額over ¥3,000
何をしているか
「同じ共変量の特徴を持っている集団の中でランダムサンプリング」
重要な前提
効果割当の確率が等しい(「商品Aの購⼊しやすさ」は等しい)
メールの⽬的︓とある商品Aを購⼊してほしい
こんなメール配信、直感的に意味がないと感じますよね︖
同じコントロールでも⾏動確率が同じとは限らない
つまり
商品購⼊の確率が同じ2グループを⽐較することが⼤切︕
商品Aが実は東京限定販売だった・・・
とあるサービスαを契約中
&前⽉の購⼊⾦額over ¥3,000
関東住みが多い
北海道住みが多い
商品購⼊の確率が
等しくない
※実際はこんなことほぼ起こり得ないけど、わかりやすい例を作るとこんなイメージ
傾向スコアとは
とある⾏動を取る確率を様々な共変量から導出したもの
・サービスAを契約しているか
・サービスBを契約しているか
︙
・前⽉の購⼊⾦額
・前⽉の購⼊品⽬
︙
傾向スコアが近い ≒ その⾏動を取る確率が近しい
機械学習で傾向スコアを作れば、⾏動を取る確率が近い集団を作れる︕
傾向スコア
⾏動を取る確率
傾向スコアを⽤いると︖
メールの⽬的︓とある商品Aを購⼊してほしい
商品購⼊の確率が
近しくなる
何をしているか
「同じ傾向の集団(⾏動確率が近い)の中でランダムサンプリング」
起こっていること
偶然の効果をできるだけ減らし、 純粋なメールの効果を⾒ている
とあるサービスαを契約中
&前⽉の購⼊⾦額over ¥3,000
傾向スコアが0.8以上
適切な⽐較層作成に機械学習が⼤きく貢献する
機械学習を使えば気づかないバイアスを減らすことができ
効果検証がより有⽤になる︕
従来型 傾向スコア(機械学習)型
メールの
効果 属性偏りの
効果
配信層 ⽐較層
メールの
効果
配信層 ⽐較層
メール効果と
錯覚したバイアス
効果を過⼤/過少評価する(ことがある) 効果を適切に評価できる
確率差による
効果
ということで
「機械学習、こんな使い⽅もできて⾯⽩いじゃん︕」
という話でした。
おわり
前回のなんちゃってデータサイエンティスト勉強会を⾒てない⽅は
前回資料もぜひ(slideshareも公開中)
https://www.slideshare.net/HiroyukiOtsubo/thinking-datascientist-itself

More Related Content

Featured

2024 State of Marketing Report – by Hubspot
2024 State of Marketing Report – by Hubspot2024 State of Marketing Report – by Hubspot
2024 State of Marketing Report – by HubspotMarius Sescu
 
Everything You Need To Know About ChatGPT
Everything You Need To Know About ChatGPTEverything You Need To Know About ChatGPT
Everything You Need To Know About ChatGPTExpeed Software
 
Product Design Trends in 2024 | Teenage Engineerings
Product Design Trends in 2024 | Teenage EngineeringsProduct Design Trends in 2024 | Teenage Engineerings
Product Design Trends in 2024 | Teenage EngineeringsPixeldarts
 
How Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental HealthHow Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental HealthThinkNow
 
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdfAI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdfmarketingartwork
 
PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024Neil Kimberley
 
Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)contently
 
How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024Albert Qian
 
Social Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsSocial Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsKurio // The Social Media Age(ncy)
 
Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024Search Engine Journal
 
5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summarySpeakerHub
 
ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd Clark Boyd
 
Getting into the tech field. what next
Getting into the tech field. what next Getting into the tech field. what next
Getting into the tech field. what next Tessa Mero
 
Google's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search IntentGoogle's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search IntentLily Ray
 
Time Management & Productivity - Best Practices
Time Management & Productivity -  Best PracticesTime Management & Productivity -  Best Practices
Time Management & Productivity - Best PracticesVit Horky
 
The six step guide to practical project management
The six step guide to practical project managementThe six step guide to practical project management
The six step guide to practical project managementMindGenius
 
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...RachelPearson36
 

Featured (20)

2024 State of Marketing Report – by Hubspot
2024 State of Marketing Report – by Hubspot2024 State of Marketing Report – by Hubspot
2024 State of Marketing Report – by Hubspot
 
Everything You Need To Know About ChatGPT
Everything You Need To Know About ChatGPTEverything You Need To Know About ChatGPT
Everything You Need To Know About ChatGPT
 
Product Design Trends in 2024 | Teenage Engineerings
Product Design Trends in 2024 | Teenage EngineeringsProduct Design Trends in 2024 | Teenage Engineerings
Product Design Trends in 2024 | Teenage Engineerings
 
How Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental HealthHow Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental Health
 
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdfAI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
 
Skeleton Culture Code
Skeleton Culture CodeSkeleton Culture Code
Skeleton Culture Code
 
PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024
 
Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)
 
How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024
 
Social Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsSocial Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie Insights
 
Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024
 
5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary
 
ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd
 
Getting into the tech field. what next
Getting into the tech field. what next Getting into the tech field. what next
Getting into the tech field. what next
 
Google's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search IntentGoogle's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search Intent
 
How to have difficult conversations
How to have difficult conversations How to have difficult conversations
How to have difficult conversations
 
Introduction to Data Science
Introduction to Data ScienceIntroduction to Data Science
Introduction to Data Science
 
Time Management & Productivity - Best Practices
Time Management & Productivity -  Best PracticesTime Management & Productivity -  Best Practices
Time Management & Productivity - Best Practices
 
The six step guide to practical project management
The six step guide to practical project managementThe six step guide to practical project management
The six step guide to practical project management
 
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
 

Verifi and ML