calculate tweet time interval for each user

ramzanzadeh72ramzanzadeh72 MemberPosts:14Contributor I
edited June 2019 in他lp

hi i have twitter dataset and i want to calculate tweets time intervals for each user... can i do this with rapidminer??

in my dataset i have user_id attribute that show the id of user that send the tweet and also time attribute thar show the send time of each tweet...

how can i do this process in rapidminer

Best Answer

  • lionelderkrikorlionelderkrikor Moderator, RapidMiner Certified Analyst, MemberPosts:1,195Unicorn
    Solution Accepted

    @ramzanzadeh72,

    我们应该以user_id对数据集进行排序,然后我n deed, you're right, by created_at. For this operation, I used

    theSort (advanced)operator from theJackhammer extension(to install from the marketplace).

    他re the new process :






















































    You can note that the interval between tweets is in milliseconds. You can customize the formula

    in the lastGenerate Attributesoperator to convert the interval in seconds, minutes, hours, days etc.

    Regards,

    Lionel

    ramzanzadeh72

Answers

  • lionelderkrikorlionelderkrikor Moderator, RapidMiner Certified Analyst, MemberPosts:1,195Unicorn

    Hi@ramzanzadeh72,

    Does this process answer to your need ?
















    <参数键= " sent_at " value = "[在]" / >




























    Regards,

    Lionel

  • ramzanzadeh72ramzanzadeh72 MemberPosts:14Contributor I

    hi@lionelderkrikor

    thanke you for your reply and attention

    it work for single user but in my dataset i have a set of users that each user send a set of tweets... for calculation this interval for each user what should i do???

  • lionelderkrikorlionelderkrikor Moderator, RapidMiner Certified Analyst, MemberPosts:1,195Unicorn

    Hi again@ramzanzadeh72,

    Could you share your dataset(s) and process to better understand your problem.

    Regards,

    Lionel

  • ramzanzadeh72ramzanzadeh72 MemberPosts:14Contributor I

    @lionelderkrikor

    i share part of my dataset that user_id show id of user that send tweet and create_at show the time that tweet send by user... in this dataset we have 3 user and each user send multiple tweet that create_at show the send time of tweet.

    so we should first sort the tweets send by each user base on create_time and then calculate interval of sequential tweets of each user.

    data.csv 237.9K
  • ramzanzadeh72ramzanzadeh72 MemberPosts:14Contributor I
    @lionelderkrikor
    Thanke you... thats right....
    But I have another question... how can I calculate entropy for these intervals for each user???
Sign InorRegisterto comment.