# Which machine learning algorithms can be used to build a recommendation system?

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

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

• 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. Nov 7 '19 at 13:07
• @NeilSlater I have edited my question. Dec 4 '19 at 5: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. Dec 4 '19 at 8: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. Dec 4 '19 at 9: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. Dec 4 '19 at 10:03