How to select random data for two different recommender systems? The business problem: We have two different vendors that offer personalized recommender engines and want to do A/B testing with them. The recommendation will give the user a personalized offer via a push message on the phone. During the testing period, we should give each provider a dataset with different details regarding the customers (purchase history, in-app events, etc). Each vendor will receive a dataset with identical info but from different clients.

What is the best method to choose the two datasets so that they would be similar in terms of client behaviour?

I assume that giving them random data from our database wouldn't be a rigorous method so one idea that I have in mind is applying dbScan clustering on our database and further randomly picking clients from each cluster - I don't know if this is the best approach. The full database has 200k clients and each dataset should contain 5k clients.

Example: After dbScan clustering there are k=10 clusters so I randomly pick elements from each cluster and split them into Dataset01 and Dataset02.

Any suggestions?
Welcome @Remus Raphael :) - Your approach is a sound option.

More specifically, if a density-based algorithm was already working for you, I'd recommend the HDBSCAN clustering algo, which should have a better performance and has a unique built-in cluster validation (based on the DBCV algorithm).

Then your general pipe line could be:


An optional pre-processing
An optional NLP / TFIDF for meaningful text features
An optional dimensionality reduction (I found TSNE and TruncatedSVD to
work nicely with HDBSCAN with textual processing)
HDBSCAN tuning for different params and distance metrics
Finally, when you're satisfied with the clustering quality - you can simply start with the 2 largest clusters for your AB testing


I'd love to hear you feedback on your actual data :)