Upgrade to Pro — share decks privately, control downloads, hide ads and more …

CFML関連のライブラリの紹介 / cfml #3 libraries

CFML関連のライブラリの紹介 / cfml #3 libraries

CFML勉強会#3の資料です。( https://cfml.connpass.com/event/150818/ )

Kazuki Taniguchi

October 30, 2019
Tweet

More Decks by Kazuki Taniguchi

Other Decks in Technology

Transcript

  1. • ৬ྺ • 2014.4-2019.3 • גࣜձࣾαΠόʔΤʔδΣϯτΞυςΫຊ෦ AI Lab
 Research Scientist

    / MLΤϯδχΞ / Data Scientist • 2019.4- • ITܥϕϯνϟʔ (ϓϩμΫτ։ൃ/ϚʔέςΟϯά) • ϑϦʔϥϯε (AI/MLͷݚڀ։ൃ) • ݚڀ෼໺ • Pattern Recognition / Image Restoration • Recommendation / Response Prediction • Counterfactual Machine Learning ࣗݾ঺հ ୩ޱ ࿨ً (@kazk1018)
  2. ࠓճ঺հ͢ΔϥΠϒϥϦ • DoWhy (Microsoft) • EconML (Microsoft) • CausalML (Uber)

    • Vowpal Wabbit (OSS) Causal Inference (uplift modeling) Contextual Bandit (ML)
  3. • ໰୊ઃఆ • ؍ଌ͞ΕΔoutcome͸࣍ͷΑ͏ʹදͤΔ Causal Inference : ಛ௃ϕΫτϧ xi ∈

    X : հೖͷׂ౰ Ti ∈ T = {0,1} : potential outcome Y(T) i ∈ ℝ Yi = Ti Y(1) i + (1 − Ti )Y(1) i
  4. Treatment Effects • Average Treatment Effect (ATE) • Conditional Average

    Treatment Effect (CATE) τ = [Y(1) − Y(0)] τ(x) = [Y(1) − Y(0) |X = x]
  5. Ͳ͏͍͏৔໘Ͱར༻͞ΕΔͷ͔ • Personalized Pricing • ໨త • ׂҾՁ֨ͰΦϑΝʔ͢Δ͜ͱͰߪೖଅਐΛߦ͏ • ׂҾ෼͸ߪೖ਺͕૿͑Δ͜ͱͰ࠾ࢉΛ߹Θ͍ͤͨ

    Treatment: Outcome: ΦϑΝʔΛग़͔͢Ͳ͏͔ ߪೖ͢Δ͔Ͳ͏͔ ໰୊ઃఆ ׂҾՁ֨ʹΑΔࢪࡦͷҼՌޮՌΛݟ͍ͨ
  6. EconMLͱCausalMLͷҧ͍ EconML CausalML estimator.fit(Y, T, X, W) estimator.estimate_ate(Y, T, X)

    Y: Outcome T: Treatment X: Features W: Controls Y: Outcome T: Treatment X: Features EconML͸CATEʹ͓͚ΔConditionͱͳΔX(Features)ͱ ͦΕҎ֎ͷಛ௃(Controls)Λ෼͚ΔԾఆΛஔ͍͍ͯΔ
  7. Algorithms DoWhy EconML CausalML Basic Algorithms (Matching, IV, RD) ̋

    Deep IV [1] ̋ Double Machine Learning [2] ̋ Orthogonal Random Forests [3] ̋ Meta-Learners [4] ̋ ̋ Uplift Tree [5] ̋
  8. Contextual Bandit • ໰୊ઃఆ • ΞʔϜΛબ୒͢ΔํࡦΛ࣍ͷΑ͏ʹఆٛ͢Δ : ಛ௃ϕΫτϧ xt ∈

    X : ʹબ୒ͨ͠ΞʔϜ at t ∈ A = {a1 , . . , aK } : ΛબΜͰಘΒΕΔใु rat at ∈ ℝ at ∼ π(xt )
  9. Approaches • Inverse Propensity Score [6] • Doubly Robust Estimator

    [7] • Direct Method • ୯७ͳใुʹؔ͢Δճؼ (biased) • Multi Task Regression[8]
  10. Input File Format ςΩετ ಛ௃ϕΫτϧ ΞΫγϣϯ ίετ ֬཰ cBD <

      >    cCE <   >    cBCD \B C D^    cBC cBCD \B C^ \B C D^  ͸ແࢹ   • ೖྗϑΥʔϚοτͱಛ௃ͷྫ ※(adfͷͱ͖) ෳ਺ߦͰΞʔϜΛදݱɺબ୒͞ΕͨΞʔϜʹίετͱ֬཰Λهड़͢Δ ※
  11. Reference 1. Jason Hartford, Greg Lewis, Kevin Leyton-Brown, and Matt

    Taddy, "Deep IV: A flexible approach for counterfactual prediction”, Proceedings of the 34th International Conference on Machine Learning, 2017. 2. Chernozhukov, Victor, Denis Chetverikov, Mert Demirer, Esther Duflo, Christian Hansen, Whitney Newey, and James Robins, “Double/Debiased Machine Learning for Treatment and Structural Parameters”, Econometrics Journal, 21, pp.C1–C68. 3. M. Oprescu, V. Syrgkanis and Z. S. Wu, "Orthogonal Random Forest for Causal Inference”, Proceedings of the 36th International Conference on Machine Learning (ICML), 2019. 4. Sören R Künzel, Jasjeet S Sekhon, Peter J Bickel, and Bin Yu, "Meta-learners for estimating heterogeneous treatment effects using machine learning”, arXiv preprint arXiv:1706.03461, 2017. 5. Piotr Rzepakowski and Szymon Jaroszewicz, "Decision trees for uplift modeling with single and multiple treatments”, Knowl. Inf. Syst., 32(2):303–327, August 2012. 6. Horvitz, D. G., & Thompson, D. J., “A Generalization of Sampling Without Replacement from a Finite Universe”, Journal of the American Statistical Association, 47(260), 663–685 7. Dudı́k Miroslav, Langford, J., & Li, L., “Doubly Robust Policy Evaluation and Learning”, In Proceedings of the 28th International Conference on Machine Learning, Bellevue, 2011 (pp. 1097–1104) 8. Karampatziakis, N., & Langford, J.,”Online Importance Weight Aware Updates”, In Proceedings of the Twenty- Seventh Conference on Uncertainty in Artificial Intelligence (pp. 392–399)
  12. Reference • DoWhy • DoWhy (https://microsoft.github.io/dowhy/index.html) • ౷ܭతҼՌਪ࿦ͷͨΊͷPythonϥΠϒϥϦDoWhyʹ͍ͭͯղઆɿͳʹ͕Ͱ͖ͯɺͳʹʹ஫ҙ͢΂͖
 (https://www.krsk-phs.com/entry/2018/08/22/060844) •

    EconML • EconML (https://github.com/microsoft/EconML) • EconMLύοέʔδͷ঺հ (meta-learnersฤ)
 (https://usaito.hatenablog.com/entry/2019/04/07/205756) • CausalML • CausalML (https://github.com/uber/causalml) • Vowpal Wabbit • Vowpal Wabbit (https://vowpalwabbit.org/index.html)