3

I am working on building a recommendation engine. I need to build a model that recommends similar items. Currently, I am using the Nearest Neighbor algorithm present in sklearn.neighbors package.

I am working in finance domain, similarity can based on the "Supplier", "Buyer", "Industry type" etc.

I have attached sample data in the image below

Sample Data

Is there any better machine learning algorithms/packages in Python for the same?

Harshith
  • 131
  • 1
  • 4
  • 3
    To get a similarity metric, you need to have some kind of context. I suggest share the nature of the data where that you are trying to find similar items - both the domain and the features that you have available. Plus share some examples of test cases for you, what counts as a similar or not, with reasons if it would not be obvious to a non-expert in the domain. This kind of knowledge will help point towards a suitable algorithm, or things you could do to make Nearest Neighbour work better for you. – Neil Slater Nov 07 '19 at 13:07
  • @NeilSlater I have edited my question. – Harshith Dec 04 '19 at 05:28
  • Thanks for the update. Your similarity metric, as described in the question, appears to be an integer from 0 to 3 depending on whether some strings match? That would not need any machine learning or recommendation system. However, I think this might be a misunderstanding. Could you clarify who the recommendations are being made to, and on what kind of basis you want to make recommendations - e.g.. what you know about a user of your recomendation engine in order to select suitable items for display. – Neil Slater Dec 04 '19 at 08:49
  • It is an item recommendation. Where each row in the image represents an item. End user is a funder to whom recommendation would be made. – Harshith Dec 04 '19 at 09:06
  • Are you expecting funders to have preferences about buyers and suppliers, that mean you could recommend based on overlaps between those preferences? E.g. funder QWE financed buyer ABC and that buyer was also funded by RTY, then RTY *also* funded buyer DEF, then you may like to recommend DEF to QWE? This is like music or film recommendations, and called "collaberative filtering". This is not the only way to make recommendations, and might not work for your problem. I am just trying to understand your goals, because you have not given enough information yet. – Neil Slater Dec 04 '19 at 10:03
  • For instance one alternative to collaberative filtering would be to find similarities between Buyer/Supplier combinations, and rank by distance, which seems closer to your orginal question. However, if you do that simply by using the id of the buyer and supplier, then you don't need any machine learning, just a simple SQL query will work. So far, it is not clear whether you want this kind of "find me the same buyer and supplier combination" or a more open-ended "what else might I be interested in, based on other user behaviour"? – Neil Slater Dec 04 '19 at 10:06
  • There are other features like the Industry, currency etc. Similarity can be based upon these also. Not just restricted to Buyer or Supplier. Maybe i have framed the question in wrong way. – Harshith Dec 04 '19 at 11:21
  • Yes, it is why I am asking questions in the comment as it is not clear to me. I think the problem is that the original question is too broad - there are lots of types of recommendation systems, used for different purposes. You are probably only interested in a small fraction of them. Please add what the system is allowed to know about the Financer to make a recommendation, and/or the context of the recommendation. For instance, a different approach would be used to recommend to the Financer in general, compared to when they are looking at an existing item, and want to see similar ones. – Neil Slater Dec 04 '19 at 13:13

0 Answers0