1
$\begingroup$

On my app, when a user selects an interest (example: ios), I'd like to show related interests (swift, xcode, apple, etc). I have a list of around 700 interests/tags (about 300 of them can be classified as tech). How do I design the system so that when a user selects one of the 700 items, the system can show other relevant items? Note that there is no "learning" involved in this. I'd just go and classify each one myself, and this list will be mostly static.

This is how I have been thinking about it:

  • I could assign a list of categories to each interest. These categories go from narrow to broad. The broadest category is just "tech", so if a user selects "ios", I could right away eliminate the 400 non-tech interests. Now I can fine-tune by looking at narrower categories (example: "mobile-apps", so I could recommend things that are categorized as "mobile-apps". I could go fine-tune further by looking at a narrower category like "ios-apps". So when a user selects an interest, I start by searching for items with the narrowest categories, and if I need more results, and I need to search for more, then, I go broader. To get started with this, I could simply have up to three categories (narrow, medium, broad) for each interest. Once I identify some categories, I can assign them as narrow, medium, or broad to each one. Now for any given interest, I can find out what other interests share the same narrow, medium, or broad categories.

  • The other approach I was thinking was to maintain a list of related interests for each interest. This requires more initial work on my part, so for each of the 700 interests, I'd find the 5-10 other interests that relate to it best, so for example, "ios" could have related interests like [swift, xcode, iphone, ipad], and so when a user enters ios, I just have to look up this list. I could maintain this list in a relevancy order. This approach is tedious as when I want to add a new interest to my list of 700 interests, I'd have to go through each and see if this new interest needs to be added as a related interest.

My question is--am I trying to reinvent the wheel? Are there any standard data models and algorithms to do this type of thing? I have been trying to Google this and the results seem to indicate things like interests graphs, cluster algorithms. I have no background in data science or machine learning. Any input is appreciated!

$\endgroup$
2
  • 1
    $\begingroup$ The problem is usually solved with machine learning. You can download the user information from Stackoverflow and do cosine similarity between the terms (tags used by users). So if you want to do it manually, you could make fake users with interests who are made by grouping the interests together. And then use cosine similarity. But you probably need lots of groups for it to work well. $\endgroup$
    – keiv.fly
    Commented Oct 10, 2018 at 23:11
  • 1
    $\begingroup$ The problem here is that to point relevant items you actually need a table with word pairs that are relevant. And the number of possible pairs is 700x699/2. To reduce the complexity you can make groups and do cosine similarity, you could make hierarchical groups like you suggested or fill in some of the 700x699/2 combinations. If you choose that one work has only one close term you would reduce the table to 700 lines. $\endgroup$
    – keiv.fly
    Commented Oct 10, 2018 at 23:19

1 Answer 1

1
$\begingroup$

I think you could use these category interests as implicit ratings, and use the Implicit package to do some collaborative filtering and recommend interests based on what other users have selected.

I'd suggest you do that instead of manually filtering out interests using your own domain knowledge. A lot of graphic designers use Apple products, and could be interested in "ios" and "painting". Its best to use the data instead of building a model based on our own understanding, or what we think is right.

$\endgroup$

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.