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

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

Ken Wagatsuma
February 10, 2018

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

Ken Wagatsuma

February 10, 2018
Tweet

More Decks by Ken Wagatsuma

Other Decks in Technology

Transcript

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

    View full-size slide

  2. 8IP
    Kenju Wagatsuma (github.com/kenju)

    • ϝσΟΞϓϩμΫτ։ൃ෦
    • αʔόʔαΠυΤϯδχΞ
    • ޷͖ͳ΋ͷɿRuby, ίʔώʔ, ϩδΧϧΫοΩϯά
    • ݏ͍ͳ΋ͷɿ1ϲ݄લʹॻ͍ͨࣗ෼ͷίʔυ

    View full-size slide

  3. ϝσΟΞϓϩμΫτ։ൃ෦
    ୲౰αʔϏεɿ
    ޿ࠂ഑৴, storeTV, cookpadTV, OEM, ͦͷଞଟ਺
    ࢀߟɿ
    ։ൃऀϒϩάʰΫοΫύουͷ޿ࠂΤϯδχΞ͸ԿΛ
    ΍͍ͬͯΔͷ͔ʱ

    View full-size slide

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

    View full-size slide

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

    View full-size slide

  6. ݫ͍͠εέδϡʔϧ
    • ϝσΟΞϓϩμΫτ։ൃ෦δϣΠϯ
    - 10݄த०
    • ͓खฒΈഈݟϓϩδΣΫτ
    - ~11݄த०
    • ഑৴࠷దԽτϥΠΞϧ
    - 12/4(݄) 10:00 - 12/11(݄) 10:00 ???

    View full-size slide

  7. ղܾ͍ͨ͠՝୊
    • ೔ʑͷखӡ༻ʹΑΔνϡʔχϯά͕ඞཁ
    - => ౔೔࡞ۀ͕ൃੜ
    • ӡ༻ऀͷܦݧͱצʹཔͬͨνϡʔχϯά
    - => ҟಈ࣌΍ಋೖ࣌ͷίετ͕ߴա͗໰୊
    • ࠷దͳࡏݿൺ཰ΛࣗಈͰௐ੔Ͱ͖ͳ͍
    - => ޿ࠂ঎඼ܝग़ͷػձଛࣦ

    View full-size slide

  8. Ͳ͏ղܾ͢Δ͔
    • ࡏݿׂ౰ྔͱ࣮੷஋͔Β࠷దͳ഑৴ൺ཰ͷิ
    ਖ਼Λߦ͏
    - ΠϯϓϨογϣϯϕʔε͔ΒΫϦοΫ਺ϕʔεͷ഑৴΁
    - ΫϦοΫ཰༧ଌΛར༻ͨ͠഑෼ൺ཰ͷࣗಈ࠷దԽ
    - ϦΞϧλΠϜूܭσʔλΛ׆༻ͨ͠ΞʔΩςΫνϟ
    ‣ Lambda Architecture ʹ͓͚Δ Speed Layer

    View full-size slide

  9. l4QFFE-BZFSzPO"84
    • Kinesis, DynamoDB,
    Lambda Λ׆༻ͨ͠
    Speed Layer (from
    Lambda Architecture)
    • طଘͷετϦʔϜʹɺΫ
    ϦοΫ཰ܭࢉϨΠϠʔΛ
    ௥Ճ͚ͨͩ͠ = ઌਓͷݞ
    ʹ৐Δ

    View full-size slide

  10. ৄ͍͠࿩͸ͪ͜Β
    ࢀߟɿ
    ʰCookpad Tech Kitchen
    #9 ʙ1ߦͷϩάͷ޲͜͏
    ଆʙ Λ։࠵͠·ͨ͠ʂʱ

    View full-size slide

  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ɹ

    View full-size slide

  12. ؒʹ߹Θͳ͍ʂ
    • τϥΠΞϧ͸ͳΜͱͯ͠΋೥಺ʹ࣮ࢪ͍ͨ͠
    - վળͷαΠΫϧΛճͨ͢Ί
    • QCDͰݴ͏ͳΒɺDelivery, QualityΛ༏ઌ
    - ͳΜͱͯ͠΋ؒʹ߹Θ͍ͤͨʂ
    • ࠷ॳ͔Β׬ᘳͳਫ਼౓༧ଌ͸·ͣෆՄೳ
    - ػցֶशͰղܾ͠ͳͯ͘΋Α͍͔·ͣߟ͑Δ
    - ࢀߟɿʰ࢓ࣄͰ͸͡ΊΔػցֶशʱ

    View full-size slide

  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

    View full-size slide

  14. աڈϩάΛݩʹΞϧΰϦζϜͷਫ਼౓Λ෼ੳ
    • Jupyter Notebook / Python
    - ࢀߟɿ։ൃऀϒϩάʰRailsΤϯ
    δχΞʹ໾ཱͭJupyter Notebook
    ͱiRubyʱ
    • ൺֱͨ͠ΞϧΰϦζϜ
    - Total Average
    - Cumulative Average
    - Simple Moving Average (3 Hours)
    - Simple Moving Average (6 Hours)

    View full-size slide

  15. τϥΠΞϧ݁Ռ
    • ิਖ਼ͷϩδοΫʹ՝
    ୊͕ݟ͔ͭͬͨ΋΋
    ͷɺτϥΠΞϧͱ͠
    ͯ͸੒ޭ

    View full-size slide

  16. ୹ظతνϡʔχϯά
    • Speed Layer ͷ࠶ઃܭɾຏ͖ࠐΈ
    - ετϦʔϜॲཧʹԊͬͨσʔλͷྲྀΕ
    • ෛ࠴ = ະୡ෼ ΛՃຯͨ͠ϩδοΫ
    - ୈҰ࣍τϥΠΞϧΛ΍͍ͬͯͳ͔ͬͨΒݟ͑ͳ͔ͬͨ՝୊
    • ҠಈฏۉΞϧΰϦζϜͷվળ
    - Batch LayerͰΦϑϥΠϯͰܭࢉ&࠷΋ਫ਼౓͕ྑ͍΋ͷΛબ୒
    - Gem࡞ͬͨ https://github.com/kenju/moving_avg-ruby

    View full-size slide

  17. த௕ظͰ΍͍͖ͬͯ
    • ΫϦοΫ཰༧ଌਫ਼౓ͷߋͳΔ޲্ˍ৽ن޿ࠂ঎඼։ൃ
    - ػցֶशϨΠϠʔͷຊ൪ಋೖ
    • Lambda Architectureͷຏ͖ࠐΈ
    - ࢀߟɿ։ൃऀϒϩάʰαʔόʔϨεͳόοΫΞοϓγεςϜ
    Λ AWS SAM Λ༻͍ͯγϡοͱߏங͢Δʱ
    • ޿ࠂ഑৴αʔόʔࣗମͷѹ౗తվળ
    - ։ൃج൫ͷ؀ڥ੔උ
    - ύϑΥʔϚϯε࠷దԽɺϨΨγʔίʔυͷվળ

    View full-size slide

  18. ຖ೔ͷྉཧΛָ͠Έʹ͢Δ
    5IBOLZPV

    View full-size slide