Kaggle winner 方案 | Instacart Market Basket Analysis: 2nd place

今天来看看 Instacart Market Basket Analysis competition 的第二名方案,作者是 Yahoo! JAPAN 的一个数据科学家 Kazuki Onodera (aka ONODERA on Kaggle)

这个比赛是要根据顾客的历史购买记录,预测 Instacart 的消费者将再次购买哪种商品,这样可以在顾客需要这个商品的时候,货源是充足的。

模型:

Kaggle winner 方案 | Instacart Market Basket Analysis: 2nd place_第1张图片

用 XGBoost 建立两个模型,分别预测

  1. 之前购买的哪种商品会出现在下次购物篮里,
    (用 6个GBDT 结果的平均值作为商品出现在用户下次购物中的预测概率)

  2. 顾客的下一次购物是否包含任何一种之前购买过的商品。
    (用 17 个 GBDT 的结果的加权平均作为用户下次购物中完全没有之前商品的概率)

特征:

分别从 顾客,商品,用户*商品,时间 的角度建立,下面列其中一些特征

顾客:

Kaggle winner 方案 | Instacart Market Basket Analysis: 2nd place_第2张图片
  1. How often the user reordered items
  2. Time between orders
  3. Time of day the user visits
  4. Features based on order sizes
  5. How many of the user’s orders contained no previously purchased items

商品:

Kaggle winner 方案 | Instacart Market Basket Analysis: 2nd place_第3张图片
  1. How often the item is purchased
  2. How many users buy it as "one shot" item
  3. Distribution of the day of week it is ordered
  4. Statistics around the time between orders
  5. Probability of being reordered within N orders
  6. Probability it is reordered after the first order

用户*商品:

Kaggle winner 方案 | Instacart Market Basket Analysis: 2nd place_第4张图片
  1. Number of orders in which the user purchases the item
  2. Days since the user last purchased the item
  3. Replacement items
  4. Whether the user already ordered the item today

时间:

  1. Counts by day of week
  2. Counts by hour

评估指标:

用 F1 得到概率

然后挑选阈值将概率转化为二进制 1/0 (Yes/No)
不同的购物记录它们的阈值也是不同的


学习资料:
http://blog.kaggle.com/2017/09/21/instacart-market-basket-analysis-winners-interview-2nd-place-kazuki-onodera/


推荐阅读 历史技术博文链接汇总
http://www.jianshu.com/p/28f02bb59fe5
也许可以找到你想要的:
[入门问题][TensorFlow][深度学习][强化学习][神经网络][机器学习][自然语言处理][聊天机器人]

你可能感兴趣的:(Kaggle winner 方案 | Instacart Market Basket Analysis: 2nd place)