Skip to content

Conversation

@antremis
Copy link

@antremis antremis commented Jan 6, 2025

This is the submission for the Python Task for Urban Match.

I have tried to improve the directory structure for maintainability on a bigger code base.

The approach for the recommendations used is on the following criteria:

  1. Users should be from the same cities
  2. Users should both be below 18 or both be above 18.
  3. There can be up to 2 years of gap in age between users.
  4. Users should have a non-zero overlap in interests.
  5. Recommendations should be sorted by the number of common interests in increasing order

Assuming a large user base, I have attempted to do the recommendation logic on the DB to offload responsibility in interest of throughput.
A better solution would be to perform a pre-computed cosine similarity on all unique interests and compute an interest-interest cosine similarity matrix. A user can then be recommended individuals based on their cosine similarities. However, I have used a more basic approach in the interest of time.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant