Pro Yearly is on sale from $80 to $50! »

広告配信サーバーと広告配信比率最適化問題

 広告配信サーバーと広告配信比率最適化問題

3b36493b4296ebeb219bcd3ffab3aa2b?s=128

Kenju Wagatsuma

February 10, 2018
Tweet

Transcript

  1. ޿ࠂ഑৴αʔόʔͱ ޿ࠂ഑৴ൺ཰࠷దԽ໰୊ ϝσΟΞϓϩμΫτ։ൃ෦ ,FOKV8BHBUTVNB 

  2. 8IP Kenju Wagatsuma (github.com/kenju)
 • ϝσΟΞϓϩμΫτ։ൃ෦ • αʔόʔαΠυΤϯδχΞ • ޷͖ͳ΋ͷɿRuby,

    ίʔώʔ, ϩδΧϧΫοΩϯά • ݏ͍ͳ΋ͷɿ1ϲ݄લʹॻ͍ͨࣗ෼ͷίʔυ
  3. ϝσΟΞϓϩμΫτ։ൃ෦ ୲౰αʔϏεɿ ޿ࠂ഑৴, storeTV, cookpadTV, OEM, ͦͷଞଟ਺ ࢀߟɿ ։ൃऀϒϩάʰΫοΫύουͷ޿ࠂΤϯδχΞ͸ԿΛ ΍͍ͬͯΔͷ͔ʱ

  4. ຊ೔࿩͍ͨ͜͠ͱɻ ϝσΟΞϓϩμΫτ։ൃ෦Ͱ ͲΜͳϓϩδΣΫτΛ΍͍ͬͯΔͷ͔ʁ

  5. νʔϜʹೖͬͯϲ݄ޙʹऔΓ૊ΜͩϓϩδΣΫτ ΫοΫύουͷ޿ࠂ഑৴αʔόʔʹ͓͚Δ ޿ࠂ഑৴ൺ཰ͷࣗಈ࠷దԽϓϩδΣΫτɻ

  6. ݫ͍͠εέδϡʔϧ • ϝσΟΞϓϩμΫτ։ൃ෦δϣΠϯ - 10݄த० • ͓खฒΈഈݟϓϩδΣΫτ - ~11݄த० •

    ഑৴࠷దԽτϥΠΞϧ - 12/4(݄) 10:00 - 12/11(݄) 10:00 ???
  7. ղܾ͍ͨ͠՝୊ • ೔ʑͷखӡ༻ʹΑΔνϡʔχϯά͕ඞཁ - => ౔೔࡞ۀ͕ൃੜ • ӡ༻ऀͷܦݧͱצʹཔͬͨνϡʔχϯά - =>

    ҟಈ࣌΍ಋೖ࣌ͷίετ͕ߴա͗໰୊ • ࠷దͳࡏݿൺ཰ΛࣗಈͰௐ੔Ͱ͖ͳ͍ - => ޿ࠂ঎඼ܝग़ͷػձଛࣦ
  8. Ͳ͏ղܾ͢Δ͔ • ࡏݿׂ౰ྔͱ࣮੷஋͔Β࠷దͳ഑৴ൺ཰ͷิ ਖ਼Λߦ͏ - ΠϯϓϨογϣϯϕʔε͔ΒΫϦοΫ਺ϕʔεͷ഑৴΁ - ΫϦοΫ཰༧ଌΛར༻ͨ͠഑෼ൺ཰ͷࣗಈ࠷దԽ - ϦΞϧλΠϜूܭσʔλΛ׆༻ͨ͠ΞʔΩςΫνϟ

    ‣ Lambda Architecture ʹ͓͚Δ Speed Layer
  9. l4QFFE-BZFSzPO"84 • Kinesis, DynamoDB, Lambda Λ׆༻ͨ͠ Speed Layer (from Lambda

    Architecture) • طଘͷετϦʔϜʹɺΫ ϦοΫ཰ܭࢉϨΠϠʔΛ ௥Ճ͚ͨͩ͠ = ઌਓͷݞ ʹ৐Δ
  10. ৄ͍͠࿩͸ͪ͜Β ࢀߟɿ ʰCookpad Tech Kitchen #9 ʙ1ߦͷϩάͷ޲͜͏ ଆʙ Λ։࠵͠·ͨ͠ʂʱ

  11. ΫϦοΫ཰༧ଌ͸೉͍͠ʂʂʂ • ޯ഑ϒʔεςΟϯάܾఆ໦ʢGBDTʣΛ༻͍ͨ޿ࠂ͝ͱͷΫϦοΫ཰༧ଌ - Facebook https://code.facebook.com/posts/975025089299409/evaluating-boosted-decision-trees-for-billions-of-users - SmartNews https://speakerdeck.com/komiya_atsushi/gbdt-niyorukuritukulu-yu-ce-wogao-su-hua-sitai-number-oresikanaito-vol-dot-4 •

    ଟ࿹όϯσΟοτ໰୊ͷҰछͰ͋ΔMortal Multi-Armed BanditsͷԠ༻ - Voyage Group http://techlog.voyagegroup.com/entry/2015/04/03/114547ɹ • Neural Networkͷ૯߹֨ಆٕʢ͕͢͞Googleʣ - Google http://www.eecs.tufts.edu/~dsculley/papers/ad-click-prediction.pdfɹ • ৴པͱ࣮੷ͷϩδεςΟοΫճؼʢୠܻ͕͠ԯϨϕϧʣ - Criteo http://olivier.chapelle.cc/pub/ngdstone.pdfɹ
  12. ؒʹ߹Θͳ͍ʂ • τϥΠΞϧ͸ͳΜͱͯ͠΋೥಺ʹ࣮ࢪ͍ͨ͠ - վળͷαΠΫϧΛճͨ͢Ί • QCDͰݴ͏ͳΒɺDelivery, QualityΛ༏ઌ - ͳΜͱͯ͠΋ؒʹ߹Θ͍ͤͨʂ

    • ࠷ॳ͔Β׬ᘳͳਫ਼౓༧ଌ͸·ͣෆՄೳ - ػցֶशͰղܾ͠ͳͯ͘΋Α͍͔·ͣߟ͑Δ - ࢀߟɿʰ࢓ࣄͰ͸͡ΊΔػցֶशʱ
  13. Ҡಈฏۉ΋Ԟ͕ਂ͍ • SMA (Simple Moving Average) = ௚ۙ N ݸͷॏΈ෇͚ͷͳ͍୯७ͳฏۉ

    • WMA (Weighted Moving Average) = ΑΓ࠷ۙͷσʔλʹॏΈ෇͚ • EWMA (Exponentially Weighted Moving Average) = ࢦ਺ؔ਺తʹॏΈ෇͚ • MMA (Modified Moving Average) = EWMAͷѥछ ଞʹ΋Triangle MA, Sine Weighted MA, KZ Filtering,...etc ࢀߟɿhttps://en.wikipedia.org/wiki/Moving_average#Simple_moving_averag
  14. աڈϩάΛݩʹΞϧΰϦζϜͷਫ਼౓Λ෼ੳ • Jupyter Notebook / Python - ࢀߟɿ։ൃऀϒϩάʰRailsΤϯ δχΞʹ໾ཱͭJupyter Notebook

    ͱiRubyʱ • ൺֱͨ͠ΞϧΰϦζϜ - Total Average - Cumulative Average - Simple Moving Average (3 Hours) - Simple Moving Average (6 Hours)
  15. τϥΠΞϧ݁Ռ • ิਖ਼ͷϩδοΫʹ՝ ୊͕ݟ͔ͭͬͨ΋΋ ͷɺτϥΠΞϧͱ͠ ͯ͸੒ޭ

  16. ୹ظతνϡʔχϯά • Speed Layer ͷ࠶ઃܭɾຏ͖ࠐΈ - ετϦʔϜॲཧʹԊͬͨσʔλͷྲྀΕ • ෛ࠴ =

    ະୡ෼ ΛՃຯͨ͠ϩδοΫ - ୈҰ࣍τϥΠΞϧΛ΍͍ͬͯͳ͔ͬͨΒݟ͑ͳ͔ͬͨ՝୊ • ҠಈฏۉΞϧΰϦζϜͷվળ - Batch LayerͰΦϑϥΠϯͰܭࢉ&࠷΋ਫ਼౓͕ྑ͍΋ͷΛબ୒ - Gem࡞ͬͨ https://github.com/kenju/moving_avg-ruby
  17. த௕ظͰ΍͍͖ͬͯ • ΫϦοΫ཰༧ଌਫ਼౓ͷߋͳΔ޲্ˍ৽ن޿ࠂ঎඼։ൃ - ػցֶशϨΠϠʔͷຊ൪ಋೖ • Lambda Architectureͷຏ͖ࠐΈ - ࢀߟɿ։ൃऀϒϩάʰαʔόʔϨεͳόοΫΞοϓγεςϜ

    Λ AWS SAM Λ༻͍ͯγϡοͱߏங͢Δʱ • ޿ࠂ഑৴αʔόʔࣗମͷѹ౗తվળ - ։ൃج൫ͷ؀ڥ੔උ - ύϑΥʔϚϯε࠷దԽɺϨΨγʔίʔυͷվળ
  18. ຖ೔ͷྉཧΛָ͠Έʹ͢Δ 5IBOLZPV