SlideShare a Scribd company logo
Santander Value Prediction Challenge
17th Solution
Kaggle Tokyo Meetup #5
@keeeeei79
• 名前 : keeeeei79
• Backgound
• 経済学部出身
• Web系新卒1年目
• Kaggle歴
• 2018/3 Toxic Comment Classification Challenge
→ 大学入学当初に買ったMBA(メモリ4G)では太刀打ちできず
• 2018/5 TalkingData AdTracking Fraud Detection Challenge
→ tkmさんの動画でGCP使えば戦えることを知るが、データがでかすぎて挫折
Who am I ?
Kaggle Meetup初参加 & 対外発表初めてなのであとでいろいろツッコみを入れていただけたらと思います
• コンペ概要
• 解法
• まとめ
Agenda
• Santander銀行がホストとなって開催された3回目のコンペ
• コンペ期間 : 2018/06/19 ~ 2018/08/20
• Target : 個々の顧客の取引価格
• データ
• 特徴はすべて匿名化されている
• スパース
• Train : 4459 x 4993
• Test : 49342 x 4992
• 評価指標
Root Mean Squared Logarithmic Error
Overview
Big Leakage
• Giba氏によってデータセットに大きなLeakageがあり、それを示すカーネルが公開される
• IDとカラムをうまく並び替えるとtargetが他のデータにleakしてることがわかる
• Leakageを公開したGiba氏のチームが1st
• PublicLB 2nd → PrivateLB 3566th というbig shake downがあった
Result
• コンペ概要
• 解法
• まとめ
Agenda
My Main Approach
Leakage Part
ML Model Part
Yes Leakage → Leakage Value
No Leakage → ML model Prediction
My Main Approach
Leakage Part
ML Model Part
Yes Leakage → Leakage Value
No Leakage → ML model Prediction
Leakage Part
• Leakage カーネルで13rows x 13columnsのIDとカラムが公開された後、
いかに他のLeakageを見つけるかの勝負になった
• 下図のように2カラムずらして値が一致してるデータを探す
• エラー分析
• うまくLeakageが見つからなかったデータを調べる
→ 正確にLeakageが見つからないデータには複数のLeakage候補が見つかってしまうことがわかった
→ 複数見つかってしまう原因は公開された13カラムだけではデータに0が多いために
一意に決まらないことだった
Leakage Part の気づき
どっちが上のデータのtargetかわからない
・ 多くのカラムの並び順がわかれば一意に決まる
Leakage Part の気づき
…
…
他の並び順が分かっているカラムセット
こっちが上のデータのtargetとわかる
→ 並び順がわかるカラム数が増えるほど正確にLeakageを見つけることができる
• カラムとIDの並び順の見つけ方
1. 既に並び順が分かっているIDだけのデータセットを使って、ランダムに1カラムずつ取り出し、隣り合うカラムをすべての
カラムから探す (この時、隣り合うカラムが一意に決まるものしか採用しない)
2. データセットを転置して、IDについても同様にして隣り合うIDを探す
3. 1,2を繰り返す (ルービックキューブ)
Leakage Part の気づき
ランダムに取ってきたカラム
残りのすべてのカラムを
1つずつ試す
もし赤い部分が一致した
カラムが1つだけだったら
加える
残りのすべてのカラムを
1つずつ試す
もし赤い部分が一致した
カラムが1つだけだったら
加える
…繰り返す
Leakage Part の気づき
• 199セットのカラムの並び(40カラムの並びは90セット)、768セットのIDの並びが
見つかった
• 見つけたカラムセットを使ってaccuracy1.0で
trainに対して3887個、testに対して7851個のLeakageが見つかった
(1stはtrainに対して3887個、testに対して7886個見つけていた)
• Leakageが見つかったデータ以外を公開カーネルで埋めると199th (シルバー)
My Main Approach
Leakage Part
ML Model Part
Yes Leakage → Leakage Value
No Leakage → ML model Prediction
ML Model Part
• LightGBM
• Features (→ 36th)
• original feature
• 見つけたカラムセットごとの統計量 (平均、標準偏差、最大、、etc)
• 見つけたカラムセット全体の統計量
• 0でないデータが70%以上のカラム全体の統計量
• 0でないデータが70%以下のカラム全体の統計量
• Leakageが見つかったTestをTrainに加える (→ 4th)
• CV 1.315
• 5 seed Averaging
ML Model Part
• 上手くいかなかったこと
• seed Averagingする際に各seed毎にLightGBMのハイパーパラメータをチューニングする
→ チューニングしないで同じハイパーパラメータを使ったほうがよかった
• Quantile系の特徴量
• original featureの値にlogを取る (late submitでやってみたらスコアが上がった...) .....etc
• やればよかったこと
• CVする時に同じユーザーを同じFoldに入れるようにする
• 特徴量はまだかなり作りこむ余地があった
• PrivateLBで1番いいものを選べなかった (Best score 4th , but submit score 17th)
原因 : Trust CVできなかった
・ (ほぼ初コンペで金圏にいたため正常な判断力を失っていた)
・ Leakageを探すことに時間を割いた結果、信頼できるCVを作ることができなかった
• cf) Final Submitの選び方の基本的な考え方
• Trust CV
• I always choose a weighted average ensemble of my safe models and select a relatively risky one. (bestfitting)
• I never chose a submission I can’t explain, even with high public LB scores. (bestfitting)
反省点 : Final Submitを選ぶまでがKaggle
• コンペ概要
• 解法
• まとめ
Agenda
まとめ
• 1アイデアでゴールドが取れるコンペもある
• エラー分析大切
• なぜ上手くいってないのかを分析して次の手につなげる
• 人気コンペの裏コンペを選ぶ
(Kaggle Meetup #4 のpocketさんの発表より)
• 参加者過去最多となったHome Creditコンペが裏で開催されていた
• Trust CV
Leakageのカラム見つけるところ以外の2位のスコアが出る
スクリプト公開したのでよければ見てください!
(要望があればLeakage見つけるスクリプトも出します)
https://github.com/keeeeei79/Kaggle_santander_solution
以上
ありがとうございました

More Related Content

Featured

AI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdfAI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
marketingartwork
 
Skeleton Culture Code
Skeleton Culture CodeSkeleton Culture Code
Skeleton Culture Code
Skeleton Technologies
 
PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024
Neil Kimberley
 
Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)
contently
 
How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024
Albert Qian
 
Social Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsSocial Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie Insights
Kurio // The Social Media Age(ncy)
 
Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024
Search Engine Journal
 
5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary
SpeakerHub
 
ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd
Clark Boyd
 
Getting into the tech field. what next
Getting into the tech field. what next Getting into the tech field. what next
Getting into the tech field. what next
Tessa Mero
 
Google's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search IntentGoogle's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search Intent
Lily Ray
 
How to have difficult conversations
How to have difficult conversations How to have difficult conversations
How to have difficult conversations
Rajiv Jayarajah, MAppComm, ACC
 
Introduction to Data Science
Introduction to Data ScienceIntroduction to Data Science
Introduction to Data Science
Christy Abraham Joy
 
Time Management & Productivity - Best Practices
Time Management & Productivity -  Best PracticesTime Management & Productivity -  Best Practices
Time Management & Productivity - Best Practices
Vit Horky
 
The six step guide to practical project management
The six step guide to practical project managementThe six step guide to practical project management
The six step guide to practical project management
MindGenius
 
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
RachelPearson36
 
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
Applitools
 
12 Ways to Increase Your Influence at Work
12 Ways to Increase Your Influence at Work12 Ways to Increase Your Influence at Work
12 Ways to Increase Your Influence at Work
GetSmarter
 
More than Just Lines on a Map: Best Practices for U.S Bike Routes
More than Just Lines on a Map: Best Practices for U.S Bike RoutesMore than Just Lines on a Map: Best Practices for U.S Bike Routes
More than Just Lines on a Map: Best Practices for U.S Bike Routes
Project for Public Spaces & National Center for Biking and Walking
 

Featured (20)

AI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdfAI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
 
Skeleton Culture Code
Skeleton Culture CodeSkeleton Culture Code
Skeleton Culture Code
 
PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024
 
Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)
 
How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024
 
Social Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsSocial Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie Insights
 
Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024
 
5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary
 
ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd
 
Getting into the tech field. what next
Getting into the tech field. what next Getting into the tech field. what next
Getting into the tech field. what next
 
Google's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search IntentGoogle's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search Intent
 
How to have difficult conversations
How to have difficult conversations How to have difficult conversations
How to have difficult conversations
 
Introduction to Data Science
Introduction to Data ScienceIntroduction to Data Science
Introduction to Data Science
 
Time Management & Productivity - Best Practices
Time Management & Productivity -  Best PracticesTime Management & Productivity -  Best Practices
Time Management & Productivity - Best Practices
 
The six step guide to practical project management
The six step guide to practical project managementThe six step guide to practical project management
The six step guide to practical project management
 
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
 
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
 
12 Ways to Increase Your Influence at Work
12 Ways to Increase Your Influence at Work12 Ways to Increase Your Influence at Work
12 Ways to Increase Your Influence at Work
 
ChatGPT webinar slides
ChatGPT webinar slidesChatGPT webinar slides
ChatGPT webinar slides
 
More than Just Lines on a Map: Best Practices for U.S Bike Routes
More than Just Lines on a Map: Best Practices for U.S Bike RoutesMore than Just Lines on a Map: Best Practices for U.S Bike Routes
More than Just Lines on a Map: Best Practices for U.S Bike Routes
 

Santander Value Prediction Challenge ​ 17th Solution​