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
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started