Table of Contents

Witt You API

Recommendations based on customer similarity for wwde.

git

https://git.picalike.corpex-kunden.de/smessuti/you_api

working version is in develop branch

Database

host: sandy.picalike.corpex-kunden.de
database: you_api

witt_products contains info for all products in the dataset

witt_customers contains info about the customers

witt_customer_similarity contains similar customers and products to be recommended

Usage

Requests should be sent to
http://frontend04-hpc.picalike.corpex-kunden.de:5000/you.php?param1=value1&param2=value2...&paramn=valuen
method: GET

Parameters

mandatory

result

filter

Customer Similarity

Given active customer C, we consider the set P of products purchased (paid and free) by C.
For each p in P we calculate the distance between p and every product in the shop.
We consider the 10 smallest distances s_0, s_1, …, s_9 (note that s_0 = 0) and for all products with distance s_i from p we assign a rating R_p(i) = 10-i.
These ratings are saved in the Mongo collection witt_products. For each customer D we calculate the similarity to C by summing the rating of the highest rated product they purchased (paid and free) for each product in P, if such a rating exists.

example

(for brevity suppose we only rate products with distance s_0 and s_1)

The similarity of D to C is given by:

Therefore we have score = 20 and count = 2 where count is the number of products from P that contributed to the score.

Recommendations

Once we have at least 50 most similar customers (we take all customers with the same score, so there could be more than 50 in the end), we look at all products bought by them which are not contained in the rated set. Such products are sorted according to the number of similar customers that bought them and the top 200 are saved in witt_customer_similarity.

When the API is called, the metadata for the recommended products is retrieved and those that pass the filters are returned ordered by their score.