Question: write a function in python called similarity(data,user1,user2) -> list Answers the question How does hashtag similarity between the users user1 and user2 vary over time?
write a function in python called similarity(data,user1,user2) -> list Answers the question How does hashtag similarity between the users user1 and user2 vary over time? Compares the hashtags used by each user for each month, and returns the numbers of hashtags which were used by both accounts in that month. To do this you will need to organize hashtags by month for each of the 2 users. We are going to plot this data so it must be ordered by month: January through December, but since our months are numbers, the data is ordered from month 1 to month 12. That is, you return an ordered list of (month, tag_set) tuples. (Hint: use get_tags_by_month_for_users), then compare those sets of hashtags (Hint: set intersection).
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
