Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
広告配信サーバーと広告配信比率最適化問題
Search
Ken Wagatsuma
February 10, 2018
Technology
0
930
広告配信サーバーと広告配信比率最適化問題
Lightening Talk at
https://techconf.cookpad.com/2018/
Ken Wagatsuma
February 10, 2018
Tweet
Share
More Decks by Ken Wagatsuma
See All by Ken Wagatsuma
Pregel Graph Compute Engines - Supersteps Exampls
kenju
1
190
Kafka on Kubernetes with Strimzi
kenju
1
130
AWS DynamoDB Accelerator (DAX) 101
kenju
3
6.8k
Moden browser introduction
kenju
1
350
Cookpad summer internship 2019 - API
kenju
0
10k
Introduction to Design Patterns
kenju
0
66
GraphQL Asia 2019 "Re-architecture of a decade-old app with BFF/GraphQL"
kenju
0
8.8k
Introduction to TypeScript
kenju
0
670
Introduction to Programmatic Ad
kenju
0
210
Other Decks in Technology
See All in Technology
Gradle: The Build System That Loves To Hate You
aurimas
2
150
新R25、乃木坂46 Mobileなどのファンビジネスを支えるマルチテナンシーなプラットフォームの全体像 / cam-multi-cloud
cyberagentdevelopers
PRO
1
130
顧客が本当に必要だったもの - パフォーマンス改善編 / Make what is needed
soudai
24
6.8k
ガチ勢によるPipeCD運用大全〜滑らかなCI/CDを添えて〜 / ai-pipecd-encyclopedia
cyberagentdevelopers
PRO
3
210
リンクアンドモチベーション ソフトウェアエンジニア向け紹介資料 / Introduction to Link and Motivation for Software Engineers
lmi
4
290k
チームを主語にしてみる / Making "Team" the Subject
ar_tama
4
310
Shift-from-React-to-Vue
calm1205
3
1.3k
CyberAgent 生成AI Deep Dive with Amazon Web Services / genai-aws
cyberagentdevelopers
PRO
1
480
IaC運用を楽にするためにCDK Pipelinesを導入したけど、思い通りにいかなかった話
smt7174
1
110
とあるユーザー企業におけるリスクベースで考えるセキュリティ業務のお話し
4su_para
3
330
【技術書典17】OpenFOAM(自宅で極める流体解析)2次元円柱まわりの流れ
kamakiri1225
0
220
物価高なラスベガスでの過ごし方
zakky
0
380
Featured
See All Featured
Creating an realtime collaboration tool: Agile Flush - .NET Oxford
marcduiker
25
1.8k
Building a Scalable Design System with Sketch
lauravandoore
459
33k
How to Think Like a Performance Engineer
csswizardry
19
1.1k
Visualizing Your Data: Incorporating Mongo into Loggly Infrastructure
mongodb
42
9.2k
RailsConf & Balkan Ruby 2019: The Past, Present, and Future of Rails at GitHub
eileencodes
131
33k
The Power of CSS Pseudo Elements
geoffreycrofte
72
5.3k
"I'm Feeling Lucky" - Building Great Search Experiences for Today's Users (#IAC19)
danielanewman
226
22k
Typedesign – Prime Four
hannesfritz
39
2.4k
Gamification - CAS2011
davidbonilla
80
5k
A better future with KSS
kneath
238
17k
How to Ace a Technical Interview
jacobian
275
23k
Rebuilding a faster, lazier Slack
samanthasiow
79
8.6k
Transcript
ࠂ৴αʔόʔͱ ࠂ৴ൺ࠷దԽ ϝσΟΞϓϩμΫτ։ൃ෦ ,FOKV8BHBUTVNB
8IP Kenju Wagatsuma (github.com/kenju) • ϝσΟΞϓϩμΫτ։ൃ෦ • αʔόʔαΠυΤϯδχΞ • ͖ͳͷɿRuby,
ίʔώʔ, ϩδΧϧΫοΩϯά • ݏ͍ͳͷɿ1ϲ݄લʹॻ͍ͨࣗͷίʔυ
ϝσΟΞϓϩμΫτ։ൃ෦ ୲αʔϏεɿ ࠂ৴, storeTV, cookpadTV, OEM, ͦͷଞଟ ࢀߟɿ ։ൃऀϒϩάʰΫοΫύουͷࠂΤϯδχΞԿΛ ͍ͬͯΔͷ͔ʱ
ຊ͍ͨ͜͠ͱɻ ϝσΟΞϓϩμΫτ։ൃ෦Ͱ ͲΜͳϓϩδΣΫτΛ͍ͬͯΔͷ͔ʁ
νʔϜʹೖͬͯϲ݄ޙʹऔΓΜͩϓϩδΣΫτ ΫοΫύουͷࠂ৴αʔόʔʹ͓͚Δ ࠂ৴ൺͷࣗಈ࠷దԽϓϩδΣΫτɻ
ݫ͍͠εέδϡʔϧ • ϝσΟΞϓϩμΫτ։ൃ෦δϣΠϯ - 10݄த० • ͓खฒΈഈݟϓϩδΣΫτ - ~11݄த० •
৴࠷దԽτϥΠΞϧ - 12/4(݄) 10:00 - 12/11(݄) 10:00 ???
ղܾ͍ͨ͠՝ • ʑͷखӡ༻ʹΑΔνϡʔχϯά͕ඞཁ - => ࡞ۀ͕ൃੜ • ӡ༻ऀͷܦݧͱצʹཔͬͨνϡʔχϯά - =>
ҟಈ࣌ಋೖ࣌ͷίετ͕ߴա͗ • ࠷దͳࡏݿൺΛࣗಈͰௐͰ͖ͳ͍ - => ࠂܝग़ͷػձଛࣦ
Ͳ͏ղܾ͢Δ͔ • ࡏݿׂྔͱ࣮͔Β࠷దͳ৴ൺͷิ ਖ਼Λߦ͏ - ΠϯϓϨογϣϯϕʔε͔ΒΫϦοΫϕʔεͷ৴ - ΫϦοΫ༧ଌΛར༻ͨ͠ൺͷࣗಈ࠷దԽ - ϦΞϧλΠϜूܭσʔλΛ׆༻ͨ͠ΞʔΩςΫνϟ
‣ Lambda Architecture ʹ͓͚Δ Speed Layer
l4QFFE-BZFSzPO"84 • Kinesis, DynamoDB, Lambda Λ׆༻ͨ͠ Speed Layer (from Lambda
Architecture) • طଘͷετϦʔϜʹɺΫ ϦοΫܭࢉϨΠϠʔΛ Ճ͚ͨͩ͠ = ઌਓͷݞ ʹΔ
ৄ͍ͪ͜͠Β ࢀߟɿ ʰCookpad Tech Kitchen #9 ʙ1ߦͷϩάͷ͜͏ ଆʙ Λ։࠵͠·ͨ͠ʂʱ
ΫϦοΫ༧ଌ͍͠ʂʂʂ • ޯϒʔεςΟϯάܾఆʢ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ɹ
ؒʹ߹Θͳ͍ʂ • τϥΠΞϧͳΜͱͯ͠ʹ࣮ࢪ͍ͨ͠ - վળͷαΠΫϧΛճͨ͢Ί • QCDͰݴ͏ͳΒɺDelivery, QualityΛ༏ઌ - ͳΜͱͯؒ͠ʹ߹Θ͍ͤͨʂ
• ࠷ॳ͔Βᘳͳਫ਼༧ଌ·ͣෆՄೳ - ػցֶशͰղܾ͠ͳͯ͘Α͍͔·ͣߟ͑Δ - ࢀߟɿʰࣄͰ͡ΊΔػցֶशʱ
ҠಈฏۉԞ͕ਂ͍ • 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
աڈϩάΛݩʹΞϧΰϦζϜͷਫ਼Λੳ • Jupyter Notebook / Python - ࢀߟɿ։ൃऀϒϩάʰRailsΤϯ δχΞʹཱͭJupyter Notebook
ͱiRubyʱ • ൺֱͨ͠ΞϧΰϦζϜ - Total Average - Cumulative Average - Simple Moving Average (3 Hours) - Simple Moving Average (6 Hours)
τϥΠΞϧ݁Ռ • ิਖ਼ͷϩδοΫʹ՝ ͕ݟ͔ͭͬͨ ͷɺτϥΠΞϧͱ͠ ͯޭ
ظతνϡʔχϯά • Speed Layer ͷ࠶ઃܭɾຏ͖ࠐΈ - ετϦʔϜॲཧʹԊͬͨσʔλͷྲྀΕ • ෛ࠴ =
ະୡ ΛՃຯͨ͠ϩδοΫ - ୈҰ࣍τϥΠΞϧΛ͍ͬͯͳ͔ͬͨΒݟ͑ͳ͔ͬͨ՝ • ҠಈฏۉΞϧΰϦζϜͷվળ - Batch LayerͰΦϑϥΠϯͰܭࢉ&࠷ਫ਼͕ྑ͍ͷΛબ - Gem࡞ͬͨ https://github.com/kenju/moving_avg-ruby
தظͰ͍͖ͬͯ • ΫϦοΫ༧ଌਫ਼ͷߋͳΔ্ˍ৽نࠂ։ൃ - ػցֶशϨΠϠʔͷຊ൪ಋೖ • Lambda Architectureͷຏ͖ࠐΈ - ࢀߟɿ։ൃऀϒϩάʰαʔόʔϨεͳόοΫΞοϓγεςϜ
Λ AWS SAM Λ༻͍ͯγϡοͱߏங͢Δʱ • ࠂ৴αʔόʔࣗମͷѹతվળ - ։ൃج൫ͷڥඋ - ύϑΥʔϚϯε࠷దԽɺϨΨγʔίʔυͷվળ
ຖͷྉཧΛָ͠Έʹ͢Δ 5IBOLZPV