Skip to content

sfujiwara/kaggle-santa-2017

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Solution for Santa Gift Matching Challenge

This is a silver medal (38th) solution for Santa Gift Matching Challenge in Kaggle.

Algorithm

  • Solve minimum cost flow problem and obtain a relaxed solution
  • Unfix some variables by heuristic rules
  • Solve mixed integer programming

How to Run

Download Data

kaggle competitions download -c santa-gift-matching -p data
unzip data/child_wishlist_v2.csv.zip -d data
unzip data/gift_goodkids_v2.csv.zip -d data

Obtain Relaxed Solution

python min_cost_flow.py

Solve MIP

python mip.py

Score

python score.py

You will get score 0.9362270126. That is slightly smaller than my best score 0.9362916416 because the heuristic condition to fix variables in mip.py is weaken for computational cost. But, this result can reach silver medal!

Releases

No releases published

Packages

No packages published

Languages