-
Notifications
You must be signed in to change notification settings - Fork 3
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Team recommendation update #50
base: develop
Are you sure you want to change the base?
Conversation
* can now change the name of a team * added shortuuid module into requirements.txt * /users/profile returns the user's id (uuid string) if the user is not in a team the team_id field will be an empty string * merged with develop * removed double imports * standardize field names in /user/profiles /teams /teams/ * combined .pop() into 1 line * update user endpoint to return user_id for each user object and set default value of seriousness to 3 * deleted a comment
…recommendation_update
* can now change the name of a team * added shortuuid module into requirements.txt * /users/profile returns the user's id (uuid string) if the user is not in a team the team_id field will be an empty string * merged with develop * removed double imports * standardize field names in /user/profiles /teams /teams/ * combined .pop() into 1 line * update user endpoint to return user_id for each user object and set default value of seriousness to 3 * deleted a comment * fixed so that user cannot invite themselves or send duplicate invites. Also after a merge takes place, the backend will proactively remove any lingering incoming and outgoing invites of the merged in team. * backend now proactively removes outgoing and incoming invites of a team once this team reaches full capacity (4 people) * users are now put back into their own team on leave and prevents users from leaving if they are alone
* fix bug with removing unwanted matches * remove unwanted teams from /teams, add total count * revert invited teams removal from /teams, add invite field to team response * add LICENSE
� Conflicts: � src/matching/team_recommendations.py
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great job! Couple things I want to clarify/change, take a look at the comments.
list_of_fields = interests | ||
list_of_fields.extend(prizes) | ||
list_of_fields.sort() | ||
bio += ''.join(list_of_fields) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Style thing: let's try to stick to double quotes ""
def lv_distance(user, user2): | ||
user_str = parse_user_to_string(user) | ||
team_mate_str = parse_user_to_string(user2) | ||
return fuzz.token_set_ratio(user_str, team_mate_str) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could we add a comment here briefly explaining what token_set_ratio
does
for member in all_open_members: | ||
team_id = member["team_id"] | ||
dis = lv_distance(user, member) | ||
if team_id in team_map: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this should be if team_id not in team_map
- might want to double check this
front_pers = front_num/(front_num+back_num) | ||
back_pers = 1-front_pers | ||
if front_pers > back_pers: | ||
if front_pers < 0.3: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This number seems arbitrary - is there a reason we picked this? Might be better to just do a direct greater than/less than comparison
intersection_size = len(set(target_team_skills).intersection(needed_skills)) | ||
team_map[team_id] *= (intersection_size * skills_weight) | ||
team_seriousness = target_team["meta"]["seriousness"] | ||
team_map[team_id] = team_map[team_id] * (intersection_size * skills_weight) * \ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Having weights makes sense, but we might want to run a few test scenarios and see how much it actually affects things. For example, we would not want to recommend seriousness 1 to seriousness 5 - that should be a pretty significant difference, meaning more weight.
@@ -1,6 +1,14 @@ | |||
from src.flaskapp.db import coll | |||
|
|||
|
|||
def get_partial_profile(email): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Where is this used?
new matching algo using fuzzy string comparison.