I have data for the orders of the previous year containing the product and the seller who sold the product. I have an information product, product category, seller, delivery address price etc. Database size is more than 100,000 rows. Now, I have to suggest a seller for a totally new product based on the data I have. I tried using TF-IDF to find similar products of the same category to suggest the sellers and I got an accuracy of 70%. Then, I tried a random forest algorithm and sadly I got an accuracy of just 40%. I am unable to find a suitable approach for my use case. How can I approach this problem statement?

The Product and Seller Mapping table is like this

productId sellerId price purchase Date deliveryAddressId
1 4 100 9-01-2012 4
2 12 400 1-08-2020 4
1 1 123 4-09-2020 1
2 3 450 24-12-2020 1
3 4 150 14-05-2020 2
5 3 430 12-02-2020 2

Product has the following information

productId name categoryId
1 AC 1
2 TV 1
3 Food 2
4 Toy 3
5 Car 3
6 Book 4

Seller has the following information

sellerId sellerName totalTransactions
1 A 81
2 B 111
3 C 200
4 D 42
  • $\begingroup$ Welcome to the site. How big is your dataset for evaluating accuracy (for new product)? Beyond TF-IDF of product, can you think of incorporating seller's past history (example: number of sales s/he completes in a month) to capture the average size of the business? Posting few examples from the data here would help to give more detailed answers. $\endgroup$
    – hssay
    Apr 12, 2021 at 6:06
  • $\begingroup$ I have updated the important information that I can use regarding seller's information. $\endgroup$ Apr 12, 2021 at 6:28
  • $\begingroup$ How did you label your data ? How did you arrive at the 70% accuracy ? $\endgroup$ Apr 12, 2021 at 6:57
  • $\begingroup$ For TF-IDF, I simply got the relevant products and predicted the supplier with the most number of transactions for those relevant products. For Random Forest Algorithm, I used one-hot encoding for predictors and I labeled sellers with their names only. I trained data for 11 months and I predicted for the 12th month. Then, I compared the predictions with actual data of the 12th month to calculate accuracy. $\endgroup$ Apr 12, 2021 at 7:37

1 Answer 1


You can use seller mean buying price, std buying price, max buying price, min buying price, median buying price PLUS include recently user buying power to suggest the totally new product to the user given the current data that's best I can recommend although extensive data can lead to better suggestions.

  • $\begingroup$ But, since I am not suggesting sellers for the exact product but instead for similar products, I cannot use the price factor. $\endgroup$ Apr 12, 2021 at 10:08
  • $\begingroup$ yes, but similar products should/must also be within customer buying power. it also depends on results though. $\endgroup$ Jun 6, 2021 at 18:43

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.