Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

More Books

Students also viewed these Databases questions

Question

5. How would you describe your typical day at work?

Answered: 1 week ago