Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Sign up for free
Menu
Search
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Pricing
Search
Sign in
Sign up for free
main.pdf
Search
Sponsored
·
Your Podcast. Everywhere. Effortlessly.
Share. Educate. Inspire. Entertain. You do you. We'll handle the rest.
→
konumaru
November 25, 2020
Technology
320
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
main.pdf
konumaru
November 25, 2020
More Decks by konumaru
See All by konumaru
Cursor × Marp 勉強会
konumaru
3
1.6k
レコメンドエンジンを Figma で爆速 UX リサーチ
konumaru
0
8.4k
7日で学んだ強化学習
konumaru
0
280
AutoML 使ってみた
konumaru
0
200
Other Decks in Technology
See All in Technology
Railsのように考える: See through the Master
snoozer05
PRO
3
690
Slack上でインフラをトラブルシュートする! Agentic Platform Engineeringの第一歩
teru0x1
4
1.7k
beyond jj: config & tools ecosystem
indirect
0
370
Reactの設計論
uhyo
24
13k
品質と信頼性を地続きにする
grimoh
0
350
俺の仕事は AIに奪われないし、たぶんその BIも要らない
hikaruri
0
460
MCPをつなげて作る組織横断のAIエージェント基盤(の開発工程)
tsubakimoto_s
0
130
HRC_Frontend_Conference_Fukuoka_2026.pdf
ts020
0
710
AIネイティブプロダクトで顧客価値を最大化するプロダクトエンジニアとFDEの協働
righttouch
PRO
0
290
AI に書かせたその API、 “信頼” できますか?
nagix
0
110
TinyGo 開発サイクルを高速化する:Go で作るエミュレータ入門
zozotech
PRO
1
730
Claude Codeを「使うほど育つ」AI秘書にするノウハウ
minorun365
PRO
23
15k
Featured
See All Featured
Stewardship and Sustainability of Urban and Community Forests
pwiseman
0
520
Exploring the Power of Turbo Streams & Action Cable | RailsConf2023
kevinliebholz
37
6.6k
Between Models and Reality
mayunak
4
460
Marketing Yourself as an Engineer | Alaka | Gurzu
gurzu
0
300
Have SEOs Ruined the Internet? - User Awareness of SEO in 2025
akashhashmi
0
500
Building a A Zero-Code AI SEO Workflow
portentint
PRO
0
720
Bridging the Design Gap: How Collaborative Modelling removes blockers to flow between stakeholders and teams @FastFlow conf
baasie
0
700
The Limits of Empathy - UXLibs8
cassininazir
1
660
How to Get Subject Matter Experts Bought In and Actively Contributing to SEO & PR Initiatives.
livdayseo
0
200
My Coaching Mixtape
mlcsv
0
310
The State of eCommerce SEO: How to Win in Today's Products SERPs - #SEOweek
aleyda
2
12k
What's in a price? How to price your products and services
michaelherold
247
13k
Transcript
バイアスのあるデータをIPWで補正してUplift Modeingを やってみた 1
⾃⼰紹介 ⼩沼 塁, @knmr_u 職業とか趣味とか 機械学習エンジニア PMに鞍替え中 kaggle, 銅 1
(だけ) 2
話す内容 テーマ バイアスのあるデータを IPW で補正して Uplift Modeing をやってみたよ TL;DR Uplift
Moddeling で介⼊効果を最⼤化できるよ バイアスのあるデータでも Uplift Modeling ができたよ ただし、傾向スコアをあまり信じすぎるのは危ないよ 3
参考資料 仕事で始める機械学習 岩波データサイエンス vol.03 4
実装について ⾃作ライブラリ pycalf を作りました 今回の実装については上記のライブラリにまとまっています 5
ToC . Uplift Modeling による介⼊効果の最⼤化 . Uplift Modeling の弱点 .
IPW (Inverse Probability Weighting) とは . IPW で Uplift Modeling の弱点を補填 . バイアスを補填した Uplift Modeling の結果 . IPW (傾向スコア) の弱点 . おまけ 6
Uplift Modeling による介⼊効果の最⼤化 7
Uplift Modeling の⽬的 何らかのマーケティング施策を想 定する 右図のような四象限を仮定する Uplift Modeling では、介⼊するこ とでCVする群である「説得可能」
を⾒つける 8
ABテストを通じたUplift Modelingの⼿順(1/7) ABテストを⾏い、以下のデータを取得する X: 特徴量, Z: 介⼊有無 (0 or 1),
Y: CV有無 (0 or 1) 9
ABテストを通じたUplift Modelingの⼿順(2/7) Z==0, Z==1 でデータを分ける つまり介⼊有無でデータを分割する 10
ABテストを通じたUplift Modelingの⼿順(3/7) Z==0, Z==1 ごとのモデルを作成 11
ABテストを通じたUplift Modelingの⼿順(4/7) 同様の検証データに対して作成したモデで予測 12
ABテストを通じたUplift Modelingの⼿順(5/7) 予測値からUplift Score と Lift を取得 Uplift_Score = treat_proba/control_proba
Lift = treat_proba − control_proba 13
ABテストを通じたUplift Modelingの⼿順(6/7) AUUC でモデルの評価を⾏う ⻘い線が介⼊した場合 左からUpliftScoreが⾼い順に介⼊効果を積み 上げている 曲線が下ぶれてくるあたりから天邪⻤が含ま れてくる 14
ABテストを通じたUplift Modelingの⼿順(7/7) UpliftScoreでソートしたLiftの累積和が最⼤ 値になるポイントを介⼊閾値に決定 AUUCの横軸をデータ数からUpliftScoreに変 える UpliftScore = 1.1 あたりが最も介⼊効果が⾼
いことがわかる 15
Uplift Modeling の弱点 ABテストを⾏ったデータが必要ということ (システム構成が複雑だとか?ユースケースあるの?とかは置いてといて) 16
Uplift Modeling が仮定していること ABテストのより得られた反実仮想のデータを学習する 17
バイアスをIPWで補正 介⼊有無により特徴量に偏りが⽣じる場合、反実仮想のデータが⼿に⼊らない そこで、IPWを使えばバイアスを補填できるのではないか と考えた 18
IPW (Inverse Probability Weighting) とは 介⼊有無を学習したモデルの予測値が傾向スコア 傾向スコアを逆確率変換したものを重みとする これをIPWと呼ぶ IPWは介⼊が必然である個体を軽く、介⼊が偶然である個体を重く扱う 上記のような処理をすることでデータの偏りを調整する
19
傾向スコアの求め⽅ 特徴量から介⼊有無を予測するモデルを作成 そのモデルの予測値を傾向スコアとする イメージ図 20
IPWのイメージ図 引⽤: 医学統計セミナー アドバンスコース 統計的因果推論と傾向スコア 21
IPW で Uplift Modeling の弱点を補填 ⽴ち戻ると、 バイアスのあるデータで Uplift Modeling がしたい
しかし、Uplift Modelig はRCTのような反実仮想を想定したデータが必要 バイアスがあってもIPWによる補正で反実仮想を想定したデータを⽤意できるのではな いか 22
重み付けモデルのイメージ図 移⾏の⼿順は通常のUplift Modelingと同じ 23
バイアスを補填した Uplift Modeling の結果 それっぽいAUUCが出てくることが確認できた。 曲線のガタツキはデータ量によるものなのでデータが少ないときは注意が必要 詳しい実装はこちら 24
IPWの弱点 分類精度が⾼すぎる場合、以下のような ことが起こる 極端な重み付け 同質のデータが存在しない 詳しくは 岩波DS vol.03 で 25
積み残し モデルの検証が不⼗分 意図した振る舞いなのかを検証するのが困難で、 ABテストの場合とバイアスがある場合のモデルの⽐較をしたいが単純には⽐較でき ない 検証の⽅法についてを真⾯⽬に考える必要がある 26
まとめ Uplift Moddeling で介⼊効果を最⼤化できるよ 介⼊することでCVする「説得可能」なセグメントを⾒つけることができる バイアスのあるデータでも Uplift Modeling ができたよ IPWをsample_weightに設定することで反実仮想を仮定することができる
ただし、傾向スコアをあまり信じすぎるのは危ないよ 傾向スコアが極端な値を取っていないか、ある程度重なりがあるか確認する必要が ある 27
おまけ 実装はpycalfのexampleにあります 傾向スコアを利⽤しない⼿法として Uber が開発していた causalML がある meta-learner や causal-tree
といった⼿法が使われている(らしい) causalML の調査資料についてはこれ 28
おわり 29