$30 off During Our Annual Pro Sale. View Details »
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
140
輪講_Kaggleで勝つデータ分析の技術_第5章
yust0724
0
91
Other Decks in Programming
See All in Programming
堅牢なフロントエンドテスト基盤を構築するために行った取り組み
shogo4131
4
1.7k
これだけで丸わかり!LangChain v1.0 アップデートまとめ
os1ma
6
1.1k
ローターアクトEクラブ アメリカンナイト:川端 柚菜 氏(Japan O.K. ローターアクトEクラブ 会長):2720 Japan O.K. ロータリーEクラブ2025年12月1日卓話
2720japanoke
0
280
AI時代もSEOを頑張っている話
shirahama_x
0
210
Socio-Technical Evolution: Growing an Architecture and Its Organization for Fast Flow
cer
PRO
0
190
[SF Ruby Conf 2025] Rails X
palkan
0
400
20 years of Symfony, what's next?
fabpot
2
250
なあ兄弟、 余白の意味を考えてから UI実装してくれ!
ktcryomm
10
10k
関数の挙動書き換える
takatofukui
4
760
251126 TestState APIってなんだっけ?Step Functionsテストどう変わる?
east_takumi
0
290
AIエージェントでのJava開発がはかどるMCPをAIを使って開発してみた / java mcp for jjug
kishida
4
840
TypeScriptで設計する 堅牢さとUXを両立した非同期ワークフローの実現
moeka__c
6
2.8k
Featured
See All Featured
Product Roadmaps are Hard
iamctodd
PRO
55
12k
Stop Working from a Prison Cell
hatefulcrawdad
273
21k
Navigating Team Friction
lara
191
16k
Refactoring Trust on Your Teams (GOTO; Chicago 2020)
rmw
35
3.3k
Automating Front-end Workflow
addyosmani
1371
200k
Intergalactic Javascript Robots from Outer Space
tanoku
273
27k
The Cult of Friendly URLs
andyhume
79
6.7k
Visualizing Your Data: Incorporating Mongo into Loggly Infrastructure
mongodb
48
9.8k
The World Runs on Bad Software
bkeepers
PRO
72
12k
Designing for Performance
lara
610
69k
The Power of CSS Pseudo Elements
geoffreycrofte
80
6.1k
Put a Button on it: Removing Barriers to Going Fast.
kastner
60
4.1k
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