Open navigation

How Klevu computes self-learning scores for products with variants and out of stock variants?

Note: The actual algorithm used for calculating self-learning scores is dynamic in nature and calculates weights for different parameters (e.g. checkouts, clicks, search terms, rating etc, i.e. that contribute to calculation of self-learning) based on how shoppers have interacted with products on the website in the recent past.  Here, in this article, to keep it simple, please note, we have considered checkouts as the only parameter contributing to self-learning scores.

Let’s say:

- Product P1 has 2 variants V1 and V2

- Product P2 has 2 variants V3 and V4

- V1 and V2 have received 9 and 10 checkouts respectively

- V3 and V4 have received 5 and 10 checkouts respectively

Earlier we used to calculate scores for each variant based on its individual performance on the website.

So, in this case, considering checkouts as the only affecting parameter, 

- V2 and V4 would have the highest self-learning score as they have the highest checkouts,

- V2 would have a score lesser than the scores of V2 and V4 but higher than the score of V3, and 

- V3 would have the least score.

Now, we combine the data (e.g. checkouts in this case) of variants to calculate overall score for a product with two or more variants.

With this, in the example shared above:

-P1 would have in total 19 checkouts

-P2 would have in total 15 checkouts

Based on these data,

- whatever the computed self-learning score for P1, it will be passed onto V1 and V2, and 

- whatever the computed self-learning score for P2, it will be passed onto V3 and V4

- In both the cases, the most popular variant per product receives a slightly higher points

So how does excluding out-of-stock products from learning work?

Now let us assume that V2 is out of stock and if the flag in our backend to not consider OOS product in learning is enabled for a store:

- P1 and therefore its variants’ (i.e. V1 and V2) scores would be calculated based on in total 9 checkouts only (i.e. the checkouts of V1 that is in stock)

- P2 and therefore its variants’ (i.e. V3 and V4) scores would be calculated based on in total 15 checkouts (i.e. sum of checkouts of V3 and V4 - both in stock)


Did you find it helpful? Yes No

Send feedback
Sorry we couldn't be helpful. Help us improve this article with your feedback.