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

オンライン広告の数理モデルと数学ソフトウェア MSFD#23

Hiroki Mizukami
September 17, 2016

オンライン広告の数理モデルと数学ソフトウェア MSFD#23

数学ソフトウェアとフリードキュメント #23

Hiroki Mizukami

September 17, 2016
Tweet

More Decks by Hiroki Mizukami

Other Decks in Science

Transcript

  1. Real Time Bidding 16 ޿ࠂओʢAdvertiserʣ ޿ࠂ୅ཧళʢAgency) ωοτϝσΟΞʢPublisherʣ DSP = Demand

    Side Platform SSP = Supply Side Platform Bid Request ! Bid ! AdCall ೖࡳ؅ཧʗӡ༻ Impression
  2. ༗ݶ࣍ݩͷ໰୊͸ऴΘ͍ͬͯΔʁʁʁ 19 SSP = Supply Side Platform DSP = Demand

    Side Platform 20 ϛϦඵ ҎԼͷϨεϙϯε औΓѻ͏σʔλͷن໛
  3. 21 ࠷ߴֹೖࡳऀ Second Price Auction ̎൪Ίͷೖࡳֹ ࢀՃඅແྉ ୭͕མࡳ͢Δʁ ͍͘ΒͰʁ མࡳग़དྷͳ͍ͱʁ

    ʹ ʹ ʹ ҰൠతͳΦϯϥΠϯ޿ࠂऔҾͰ͸མࡳֹʹ2nd Price͕࠾༻͞Ε͍ͯΔ
  4. ϝΧχζϜσβΠϯ 23 DSP = Demand Side Platform SSP = Supply

    Side Platform Bid Request ! Bid ! ചΓखͱങ͍ख૒ํͷརӹΛ ࠷େԽ͢Δ࢓૊ΈʢʹϝΧχζϜʣ͕ඞཁ
  5. ඇՄ෼୯ҰࡒΦʔΫγϣϯ 26 — ti 2 T = [0, 1] :

    T ! R+ λΠϓ஋ ೖࡳؔ਺ʢઓུʣ Ձ஋ؔ਺ʢޮ༻ʣ ࡒʹର͢ΔϓϨΠϠʔͷબ޷ ࡒʹΑͬͯಘΒΕΔޮ༻ ࡒʹର͢Δೖࡳֹ ඇՄ෼୯ҰࡒରশΦʔΫγϣϯ vi : T ! R+
  6. v 27 ඇՄ෼୯ҰࡒରশΦʔΫγϣϯ ೖࡳ݁Ռ ϝΧχζϜ ίετ མࡳ b = 0

    B B B B B B B B @ (t1) (t2) . . . (ti) . . . (tn) 1 C C C C C C C C A c(b) = 0 B B B B B B B B @ 10 10 . . . 20 . . . 0 1 C C C C C C C C A w(b) = 0 B B B B B B B B @ False True . . . False . . . False 1 C C C C C C C C A
  7. v 28 ඇՄ෼୯ҰࡒରশΦʔΫγϣϯ pi = wi(b)v(ti) ci(b) ϓϨΠϠʔiͷརಘ n X

    i=0 pi + n X i=0 ci ചΓख΋ؚΊͨࣾձత༨৒ ങ͍खʼ ʻചΓख ചΓखʹͱͬͯͷࡒͷՁ஋ΛԾఆ͢Δ৔߹΋͋Δ ʢFloor Priceʣ
  8. v 29 ඇՄ෼୯ҰࡒରশΦʔΫγϣϯ pi = wi(b)v(ti) ci(b) ϓϨΠϠʔiͷརಘ n X

    i=0 pi + n X i=0 ci ചΓख΋ؚΊͨࣾձత༨৒ ങ͍खʼ ʻചΓख ചΓखʹͱͬͯͷࡒͷՁ஋ΛԾఆ͢Δ৔߹΋͋Δ ʢFloor Priceʣ keyword: ऩӹಉ஋ੑఆཧ ϝΧχζϜ ʹ ୭͕͍͘Β෷͏͔ ʴ ୭͕མࡳ͢Δͷ͔
  9. First Price Auction ϓϨΠϠʔiΛࣗ෼ͩͱࢥ͏ ࣗ਎ͷλΠϓ͸ఆ਺ ଞͷϓϨΠϠʔͷλΠϓ͸෼͔Βͳ͍ i.i.d ΛԾఆͨ֬͠཰ม਺ͱ͢Δ ͜͜Ͱ ͸

    ֬཰ม਺ ͷ෼෍ؔ਺ 32 ti = t 2 [0, 1] F : R ! [0, 1] T1, T2, · · · , Ti 1, Ti+1, · · · , Tn ⇠ F T ࠓҪ ੖༤ ,Ԭా ষ. ήʔϜཧ࿦ͷԠ༻, Ⴛ૲ॻ๪ [2005]
  10. First Price Auction 33 pi = wi(b)v(ti) ci(b) ϓϨΠϠʔiͷརಘ ϓϨΠϠʔiͷظ଴རಘ

    উͭ֬཰ ʢॱং౷ܭྔͷ෼෍ʣ উͬͨ࣌ͷརಘ ↑̍ҐՁ֨ E[pi] = (v(ti) (ti)) · F(ti)n 1
  11. First Price Auction 34 ϓϨΠϠʔiͷظ଴རಘ উͭ֬཰ ʢॱং౷ܭྔͷ෼෍ʣ উͬͨ࣌ͷརಘ ↑̍ҐՁ֨ E[pi]

    = (v(ti) (ti)) · F(ti)n 1 = (v(ti) bi) · F( 1(bi))n 1 ͜ͷ஋Λ࠷େԽ͢Δೖࡳؔ਺͸ղੳతʹಋग़Մೳ͕ͩɽɽɽ λΠϓͷ෼෍ΛϞσϦϯά͢Δඞཁ͕ग़ͯ͘Δ ؆୯͡Όͳ͍
  12. Second Price Auction 35 Ձ஋ vi ೖࡳֹ ࣗ෼Λআ͘࠷ߴೖࡳֹ bM =

    max i6=j bj bi ͜ͷݩͰ৔߹෼͚Λͯ͠ߟ͑Δ 1) 2) 3) bi < vi bi = vi bi > vi উͬͨ࣌ͷརಘ pi = vi bM ෛ͚ͨ࣌ͷརಘ pi = 0 ࠓҪ ੖༤ ,Ԭా ষ. ήʔϜཧ࿦ͷԠ༻, Ⴛ૲ॻ๪ [2005]
  13. Second Price Auction 36 vi bM bM bM vi =

    bi bi bi མࡳ མࡳ མࡳ pi = 0 pi = 0 pi > 0 pi > 0 pi > 0 pi = 0 pi = 0 pi > 0 pi = 0 pi < 0 vi
  14. Second Price Auction 37 vi bM bM bM vi =

    bi bi bi མࡳ མࡳ མࡳ pi = 0 pi = 0 pi > 0 pi > 0 pi > 0 pi = 0 pi = 0 pi > 0 pi = 0 pi < 0 = = = = = = > < vi
  15. Second Price Auction 38 vi vi bM bM bM vi

    = bi bi bi མࡳ མࡳ མࡳ pi = 0 pi = 0 pi > 0 pi > 0 pi > 0 pi = 0 pi = 0 pi > 0 pi = 0 pi < 0 = = = = = = > < ࠷దઓུ͸ ࣗ෼ʹͱͬͯͷՁ஋Λ ਃࠂ͢Δࣄ
  16. Second Price Auction 39 vi vi bM bM bM vi

    = bi bi bi མࡳ མࡳ མࡳ pi = 0 pi = 0 pi > 0 pi > 0 pi > 0 pi = 0 pi = 0 pi > 0 pi = 0 pi < 0 = = = = = = > < ࣗ෼ʹͱͬͯͷ Ձ஋ʁʁ
  17. Real Time Bidding ʢ࠶ܝʣ 41 ޿ࠂओʢAdvertiserʣ ޿ࠂ୅ཧళʢAgency) ωοτϝσΟΞʢPublisherʣ DSP =

    Demand Side Platform SSP = Supply Side Platform Bid Request ! Bid ! AdCall ೖࡳ؅ཧʗӡ༻ Impression
  18. Real Time Bidding ʢ࠶ܝʣ 42 ޿ࠂओʢAdvertiserʣ ޿ࠂ୅ཧళʢAgency) ωοτϝσΟΞʢPublisherʣ DSP =

    Demand Side Platform SSP = Supply Side Platform Bid Request ! Bid ! AdCall ೖࡳ؅ཧʗӡ༻ Impression DSP ͸ Impression ʹରͯ͠ ೖࡳ͢Δʢങ͍͍ͨʣ
  19. Demand Side ࢹ఺ͰݟΔΫϦοΫ՝ۚϞσϧ ͇͇ϒϩά xxxxxxxxx xxxxxxxxx xxxxxxxxx xxxxxxxxxxxxxxxxxx xxxxxxxxxxxxxxxxxx xxxxxxxxxxxxxxxxxx

    xxxxxxxxxxxxxxxxx ܹ҆ʂ Impression ͇͇ϒϩά xxxxxxxxx xxxxxxxxx xxxxxxxxx xxxxxxxxxxxxxxxxxx xxxxxxxxxxxxxxxxxx xxxxxxxxxxxxxxxxxx xxxxxxxxxxxxxxxxx ܹ҆ʂ Click ͓΍ʁ PublisherʗSell Sideʹ ର͢Δࢧ෷͍ൃੜ ̎Ґೖࡳֹ Advertiser͔Βͷใु͕ൃੜ ݻఆֹʢCPC=cost/clickʣ
  20. Demand Side ࢹ఺ͰݟΔΫϦοΫ՝ۚϞσϧ Impression ͷՁ஋ ΫϦοΫ୯Ձ ʹ ͇ p(Click|Imp) CPC

    CTR ʹ ͇ Cost Per Click Click Through Rate ※̏จࣈΞϧϑΝϕοτଟͯ͘͢Έ·ͤΜ
  21. Demand Side ࢹ఺ͰݟΔΫϦοΫ՝ۚϞσϧ Impression ͷՁ஋ ΫϦοΫ୯Ձ ʹ ͇ p(Click|Imp) CPC

    CTR ʹ ͇ Cost Per Click Click Through Rate ※̏จࣈΞϧϑΝϕοτଟͯ͘͢Έ·ͤΜ Second Price Auction ͷ΋ͱͰ ࠷దೖࡳઓུ
  22. ݻఆ Demand Side ࢹ఺ͰݟΔΫϦοΫ՝ۚϞσϧ Impression ͷՁ஋ ΫϦοΫ୯Ձ ʹ ͇ p(Click|Imp)

    CPC CTR ʹ ͇ Cost Per Click Click Through Rate ※̏จࣈΞϧϑΝϕοτଟͯ͘͢Έ·ͤΜ Second Price Auction ͷ΋ͱͰ ࠷దೖࡳઓུ
  23. ༧ଌ͍ͨ͠ʂʂʂ ݻఆ Demand Side ࢹ఺ͰݟΔΫϦοΫ՝ۚϞσϧ Impression ͷՁ஋ ΫϦοΫ୯Ձ ʹ ͇

    p(Click|Imp) CPC CTR ʹ ͇ Cost Per Click Click Through Rate ※̏จࣈΞϧϑΝϕοτଟͯ͘͢Έ·ͤΜ Second Price Auction ͷ΋ͱͰ ࠷దೖࡳઓུ
  24. ΫϦοΫ༧ଌͷ໰୊ઃఆ 48 ϝσΟΞ ޿ࠂ ͦͷଞಛ௃ ΫϦοΫͨ͠ʁ ඒ༰ Խহ ɽɽɽ 1

    ඒ༰ ΰϧϑ ɽɽɽ 0 ཱྀߦ ΰϧϑ ɽɽɽ 0.9ʁ ৯඼ ݈߁ ɽɽɽ 0.8ʁ ܇࿅σʔλ ༧ଌσʔλ ͜ͷΫϦοΫ֬཰Λ༧ଌ͍ͨ͠
  25. Click or Not ΛϕϧψʔΠ෼෍Ͱଊ͑Δ ΞΫηεϩά ɿ i.i.d ฼ฏۉ ͷ࠷໬ਪఆྔ͸ ͜ͷ࠷໬ਪఆྔͷ؍ଌ஋Λ༧ଌCTRʢeCTR)ͱͯ͠࠾༻͢Δʁ

    ࣮͸͜ΕͰ͸ෆे෼ʢͰ΋ͳ͔ͳ͔͍͍ʣ ͳͥʁʁʁʁʁʁ p ¯ p = 1 n n X i=1 Yi Y1, Y2, · · · , Yn ⇠ Be(p)
  26. Click or Not ΛϕϧψʔΠ෼෍Ͱଊ͑Δ ঁੑ޲͚ϝσΟΞ ए೥૚޲͚Խহ඼ͷAd ঁੑ޲͚ϝσΟΞ ΰϧϑ৔༧໿αʔϏεͷAd ͇ ͇

    ͲͪΒͷ΄͏͕CTR͕ߴ͍͔ ౰વલऀɼϝσΟΞͱ޿ࠂओͷ਌࿨ੑ͕ߴ͍͔Β ͜ͷ͜ͱΛϞσϦϯά͢Δ VS
  27. Click or Not ΛϕϧψʔΠ෼෍Ͱଊ͑Δ ΞΫηεϩά ɿ ( , , )

    ޿ࠂओͷಛ௃ ϝσΟΞͷಛ௃ Yi ⇠ Be(pi) ͨͩ͠ ͜ͷ Λ࠷໬ਪఆ͢Ε͹ྑ͍ ͜ͷϞσϧΛLogistic Regressionͱ͍͏ pi = f ✓ ( x ) = 1 1 + e x = ( X j ✓jXij + ✓0) ✓0, ✓1, · · · , ✓f minimize L ( ✓ ) = log p ( Y |X, ✓ ) = n X i=0 log p ( Yi |Xi, ✓ )
  28. ػցֶशʹΑΔ༧ଌ͕͏·͍͔͘ͳ͍৔߹ͷݪҼ σʔλʹରͯ͠Ϟσϧͷදݱྗ͕௿͗͢Δ ܇࿅σʔλ಺Ͱ΋ਫ਼౓͕ѱ͍ σʔλʹରͯ͠Ϟσϧͷදݱྗ͕ߴ͗͢Δ ܇࿅σʔλҎ֎ͷσʔλ΁ͷਫ਼౓ʢ൚Խੑೳʣ͕௿͍ 54 pi = ( X

    j ✓jXij + ✓0) ʦࢀߟʧަޓ࡞༻߲ΛೖΕΕ͹ϩδεςΟοΫճؼͰ΋ඇઢܗ෼཭ՄೳʹͳΔ͜ͱ΋͋Δ http://tjo.hatenablog.com/entry/2015/03/26/190000 wikimedia Commons File:Overfitting.svg pi = ( X j ✓jXij + X j X k j+1 wjkXjXk + ✓0)
  29. ʦରࡦ̏ʧFactorization Machineͷࣗ༝౓࡟ݮͷΞΠσΟΞ pi = ( X j ✓jXij + X

    j X k j+1 wjkXjXk + ✓0) pi = ( X j ✓jXij + X j X k j+1 hvj, vk iXjXk + ✓0) ( ( ' ( ( ( ( W V f f f k <͘͢͝খ͍̺͞ V ⇤ Steffen Rendle, Factorization Machines [ICDM 2010]
  30. [1]ࢪࡦʹର͢Δ༧ࢉ഑෼໰୊ 63 y = X i ✓i log(xi + 1)

    + ✓0 Optim Modeling ※Ϟσϧࣜ͸μϛʔ ঎ࡐʹ߹Θͤͯద੾ʹ σβΠϯ͢Δ y = X i ✓i log(xi + 1) + ✓0 y = X i ✓i log(xi + 1) + ✓0 Optim Modeling y = X i ✓i log(xi + 1) + ✓0 ͜ΕΛ܁Γฦͯ͠࠷దͳ༧ࢉ഑෼Λ୳Δ ʦ໰୊ʧച্Λ֫ಘͭͭ͠ɼޮ཰Α͘୳ࡧ͢Δʹ͸ʁ
  31. ௨ৗͷਖ਼نઢܗϞσϧ ಈతઢܗϞσϧ ͜ͷa_t, b ,σ Λਪఆ͢Ε͹ྑ͍ ΑΓҰൠతʹ͸ঢ়ଶۭؒϞσϧ Ͳ͏΍ͬͯܭࢉ͢Ε͹͍͍͔ʁ 67 [2]

    ಉ͡ࢪࡦ͸ܧଓͯ͠ߦ͏ͱޮՌ͸చݮ͢Δͷ͔ʁ yt ⇠ N( axt + b, 2) yt ⇠ N( atxt + b, 2) at ⇠ N(at 1, 2 a )
  32. Stanͷϓϩάϥϛϯά 71 log p ( ✓|Y, X ) = log

    p ( X, Y |✓ ) + log p ( ✓ ) C p(✓|Y, X) = p(X, Y |✓)p(✓) R p(X, Y |✓)p(✓)d✓ ೖྗ ग़ྗ ϕΠζਪ࿦ͱStan
  33. 72 Y ✓ log p ( Y |✓ ) +

    log p ( ✓ ) ͷએݴ ͷએݴ Λهड़ ϕΠζਪ࿦ͱStan
  34. 73 Y ✓ log p ( Y |✓ ) +

    log p ( ✓ ) ͷએݴ ͷએݴ Λهड़ ϕΠζਪ࿦ͱStan