Skip to content
All work

Machine learning · 2019

Shopping Recommendation Model

Recommends products that match what is already in a shopping cart, trained on a dataset built for the job.

  • Python
  • Jupyter

A model that recommends products matching the ones already in the cart, based on what was placed in it before. No suitable dataset existed, so I built my own.

How the dataset is arranged

  1. Every entry in x_train has a corresponding entry in y_train.
  2. Each commodity is encoded as three integers. The first is its type; the next two are subcategories, since an item can sit in two.

Type and subcategory codes

  • 1 · food item: vegetable 1, fruit 2, liquid 3, packed 4, chinese 5, dairy 6
  • 2 · medicine: fever 1, family planning 2, acute 3, chronic 4, daily nutrients 5, syrup 6
  • 3 · self care: teeth 1, hair 2, face 3, body 4, grooming 5, sanitising 6
  • 4 · electric: hair 1, computer 2, laptop 3, mobile 4, other 5
  • 5 · study: writing 1, paper 2, measuring 3, tools 4
  • 6 · cleaning: body 1, surrounding 2, electric 3
  • 7 · decoration: self 1, surrounding 2