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
2019 Data Science Bowl competition solution
Search
Yust0724
May 20, 2020
Programming
0
110
2019 Data Science Bowl competition solution
2019/10~2020/1に実施された、2019 Data Science Bowl compで我々のチームが実施したことを記載しました。
Yust0724
May 20, 2020
Tweet
Share
More Decks by Yust0724
See All by Yust0724
輪講_Kaggleで勝つデータ分析の技術_第2章
yust0724
0
120
輪講_Kaggleで勝つデータ分析の技術_第5章
yust0724
0
87
Other Decks in Programming
See All in Programming
The Evolution of Enterprise Java with Jakarta EE 11 and Beyond
ivargrimstad
0
180
はじめてのWeb API体験 ー 飲食店検索アプリを作ろうー
akinko_0915
0
130
The Niche of CDK Grant オブジェクトって何者?/the-niche-of-cdk-what-isgrant-object
hassaku63
1
500
「テストは愚直&&網羅的に書くほどよい」という誤解 / Test Smarter, Not Harder
munetoshi
0
190
オンコール⼊⾨〜ページャーが鳴る前に、あなたが備えられること〜 / Before The Pager Rings
yktakaha4
1
770
GitHub Copilot and GitHub Codespaces Hands-on
ymd65536
2
150
顧客の画像データをテラバイト単位で配信する 画像サーバを WebP にした際に起こった課題と その対応策 ~継続的な取り組みを添えて~
takutakahashi
1
310
おやつのお供はお決まりですか?@WWDC25 Recap -Japan-\(region).swift
shingangan
0
140
LT 2025-06-30: プロダクトエンジニアの役割
yamamotok
0
810
技術同人誌をMCP Serverにしてみた
74th
1
680
Hack Claude Code with Claude Code
choplin
6
2.4k
AIともっと楽するE2Eテスト
myohei
8
2.9k
Featured
See All Featured
XXLCSS - How to scale CSS and keep your sanity
sugarenia
248
1.3M
Exploring the Power of Turbo Streams & Action Cable | RailsConf2023
kevinliebholz
34
5.9k
The Illustrated Children's Guide to Kubernetes
chrisshort
48
50k
Designing for Performance
lara
610
69k
Imperfection Machines: The Place of Print at Facebook
scottboms
267
13k
How to Ace a Technical Interview
jacobian
278
23k
Docker and Python
trallard
45
3.5k
Being A Developer After 40
akosma
90
590k
JavaScript: Past, Present, and Future - NDC Porto 2020
reverentgeek
50
5.5k
Writing Fast Ruby
sferik
628
62k
Site-Speed That Sticks
csswizardry
10
700
Faster Mobile Websites
deanohume
307
31k
Transcript
DSBίϯϖࢀઓه 2020/05/20 Yu Sato @Yust Kaggle LTձ
ࣗݾհ ▪ 20192݄͜Ζ͔ΒkaggleʹࢀՃɻ ▪ ͖ɿΫϩɺ kaggleɺαφɺ͏ͳ͗ ▪ ؾʹͳΔɿϗοτΫοΫ
2019DataScienceBowlίϯϖͱʁ 3 ࢠڙ͚ΞϓϦͷϩά͔Βɺग़͞ΕΔ՝ͷਖ਼Λਪఆ͢Δɻ train test installation_id title event_code event_data accuracy_group
0006a69f Cart Balancer 4010 4010 4010 4010 Bird Measurer NG OK NG NG 2 0 015776b4 Bird Measurer 4010 Mushroom Sorter OK 3 తมɻ 3ɿ1ճͰOK 2ɿ2ճͰOK 1ɿ3ճҎ্ͰOK 0ɿall NG ? ࠷ޙͷtitleͷ accuracy_groupΛਪఆ
ํ 4 2िؒͱ͍͏ݶΒΕͨظؒͰɺޮతʹਐΊΔํΛཱͯͨɻ ɾFE ɹ- kernelಛྔΛར༻ɻϦʔΫ͍ͯ͠Δͷ͕ͳ͍͔νΣοΫɻ ɹ- null importanceͰ༗ޮͳಛྔΛબɻ ɾmodel
ɹ- LGBMͷmodelΛseed averagingͰΞϯαϯϒϧɻ ɹ- qwkͷᮢ࠷దԽɻ ɾfinal submit ɹ- publicLB, cv͕ߴ͍ͷΛ1ͭͣͭબɻ
My Team Solution 5 Feature Engineering Feature Selection LGBM LGBM
LGBM Threshold Ensemble train, test submit - kernel + my team - Null importance - KFold - Seed Averaging - Optimized Rounder - Optimized coefficients - public:0.532 / private:0.545 Threshold Threshold
FeatureEngineering (kernel) 6 targetͱͷ૬͕ؔۃʹߴ͍ͷʢ=OverfitͷՄೳੑ͕͋Δʣ͕ͳ͍͔Λ֬ೝɻ →ۃʹߴ͍ͷଘࡏͤͣɻ
FeatureEngineering (my team) 7 installation_idͷɺ࣮ࢪͨ͠Ξηεϝϯτͷͱਖ਼Λूܭɻ 1st → 4ճʹOK 2nd →
2ճʹOK 3rd → 1ճͰOK 1st → 4ճશͯNG ࣍1ճͰOKʹͳΓͦ͏ ࣍શͯNG͔ɺ ྑͯ͘ճʹOK͔ʁ
FeatureSelection 8 targetΛshuffleͨ͠ͷͱ࣮ࡍͷtargetͰFeatureImportanceΛൺֱ͢Δɻ →1000ݸͷಛྔͷ͏ͪɺ200ݸΛͬͨɻ ࢀߟɿhttps://www.kaggle.com/ogrellier/feature-selection-with-null-importances ࣮ࡍͷσʔλͷͱ͖ͷ ΈɺImportance͕ߴ͍ →ॏཁͳಛྔ Shuffleͯ͠Importance ͕มΘΒͳ͍
→ϊΠζಛྔ
ᮢͰྨ Threshold 9 qwkͷ༧ଌɺ·ͣճؼͰਪఆͦ͠ͷΛᮢͰྨͨ͠ɻ(kaggleຊɹɹɹ p.100ࢀর) ͦͷࡍͷᮢͷܾఆํ๏Λݕ౼ͨ͠ɻ target 0.45 1.12 2.90
2.04 0.80 1.77 target 0 1 3 2 0 1 threshold 0.00 ~ 0.80 → 0 0.81 ~ 1.80 → 1 1.81 ~ 2.50 → 2 2.51 ~ 3.00 → 3 f_1 f_2 f_3 f_4 ճؼͰ༧ଌ
Threshold 10 trainͰ࠷దԽ͞ΕͨᮢΛٻΊɺͦΕΛ༻͍ͯtestΛྨɻ threshold 0.00 ~ 0.80 → 0 0.81
~ 1.80 → 1 1.81 ~ 2.50 → 2 2.51 ~ 3.00 → 3 train LGBM OptimizedRounder test LGBM OptimizedRounder prob_target target 0.45 1 1.12 2 2.90 2 2.04 0 target 0.45 1.12 2.90 2.04 ɾ࠷దͳᮢͷಋग़ ɾճؼ͔Βྨ Λ࣮ࢪ͢Δɻ ίʔυΞϥΠ͞Μ͕·ͱΊͯ ͘Ε͍ͯΔ(*)ɻ (*)https://qiita.com/kaggle_master-arai-san/items/d59b2fb7142ec7e270a5 target 0 1 3 2
submit 11 PublicLB͕࠷ߴ͍ͷɺcv͕࠷ߴ͍ͷͷ2ͭΛબɻ →cv͕࠷ߴ͍#5͕ɺPrivateLBʹ͍ͭͯ࠷ߴ͔ͬͨɻ # PublicLB cv final sub PrivateLB
kernel 1 0.550 - x 0.520 2 0.542 - 0.520 3 0.537 - 0.534 myTeam 4 0.533 0.60357 0.544 5 0.532 0.60630 x 0.545 6 0.532 0.60333 0.544 7 0.527 0.60583 0.543 ۜϝμϧGET!!
12 Kagglerʹݹ͔͘ΒΘΔ֨ݴɻ rank1ҐͷbestfittingࢯɺҎԼͷΑ͏ʹड़͍ͯΔɻ A good CV is half of success.
I won’t go to the next step if I can’t find a good way to evaluate my model. ʢྑ͍CVཱ͕֬Ͱ͖Εɺޭͷಓͱݴ͑ΔɻࢲɺϞσϧͷྑ͍ධՁํ๏͕͔Δ·Ͱɺ࣍ͷεςοϓਐ·ͳ͍ɻʣ Trust your CV.
·ͱΊ 13 ▪ ظؒͷνϟϨϯδͰɺ࠷ݶΔ͜ͱΔɻ ▪ աڈͷྨࣅίϯϖνΣοΫ͢Δɻ ▪ Trust your CV
͋Γ͕ͱ͏͍͟͝·ͨ͠ɻ ▪ Kaggle: @Yust ▪ Twitter: @yust_kaggle ▪ e-mail:
[email protected]
[ิ] ධՁࢦඪʢQWKʣ 15 ɾQuadratic Weighted KappaʢॏΈ͖Χούʣ ɾԕ͍ྨͰ֎ͨ࣌͠ͷଛࣦ͕େ͖͍ɻ ࢀߟɿhttps://bellcurve.jp/statistics/blog/14200.html