Body: <p>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 <a href="https://scikit-learn.org/stable/modules/neighbors.html" rel="nofollow noreferrer"><code>sklearn.neighbors</code></a> package. </p>
  
  <p>I am working in finance domain, similarity can based on the "Supplier", "Buyer", "Industry type" etc.</p>
  
  <p>I have attached sample data in the image below</p>
  
  <p><a href="https://i.sstatic.net/BTFqr.png" rel="nofollow noreferrer"><img src="https://i.sstatic.net/BTFqr.png" alt="Sample Data"></a></p>
  
  <p>Is there any better machine learning algorithms/packages in Python for the same?</p>
  
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2019-11-07T13:07:18.717Z
Comments.Text: 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.
Comments.UserDisplayName: Neil Slater
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2019-12-04T05:28:36.770Z
Comments.Text: @NeilSlater I have edited my question.
Comments.UserDisplayName: Harshith
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2019-12-04T08:49:20.857Z
Comments.Text: 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.
Comments.UserDisplayName: Neil Slater
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2019-12-04T09:06:35.147Z
Comments.Text: 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.
Comments.UserDisplayName: Harshith
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2019-12-04T10:03:31.083Z
Comments.Text: 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.
Comments.UserDisplayName: Neil Slater
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2019-12-04T10:06:24.770Z
Comments.Text: 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"?
Comments.UserDisplayName: Neil Slater
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2019-12-04T11:21:44.970Z
Comments.Text: 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.
Comments.UserDisplayName: Harshith
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2019-12-04T13:13:11.903Z
Comments.Text: 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.
Comments.UserDisplayName: Neil Slater
Tags: <machine-learning><python><recommender-system>
Title: Which machine learning algorithms can be used to build a recommendation system?
UserDisplayName: Harshith
ThreadText: # Which machine learning algorithms can be used to build a recommendation system?
  
  (Asked by: username_0 on 2019-11-07)
  
  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`](https://scikit-learn.org/stable/modules/neighbors.html) 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](https://i.sstatic.net/BTFqr.png)](https://i.sstatic.net/BTFqr.png)
  
  Is there any better machine learning algorithms/packages in Python for the same?
  
  **Tags:** machine-learning, python, recommender-system
  
  > **Comments:**
  > **username_1**: 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.  
  > **username_0**: @username_1 I have edited my question.  
  > **username_1**: 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.  
  > **username_0**: 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.  
  > **username_1**: 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.  
  > **username_1**: 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"?  
  > **username_0**: 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.  
  > **username_1**: 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.  
  
  ---
  
  ## 0 answers
  
  