
Master’s thesis Czech Technical University in Prague Faculty of Electrical Engineering F3 Department of Cybernetics Twitter’s local trends spread analysis Gustav Šourek Program: Open Informatics Field: Artificial Intelligence April 2013 Supervisor: Ing. Ondřej Kuželka Acknowledgement / Declaration I would like to thank my supervisor, I hereby declare that this thesis is Ing. Ondřej Kuželka, for giving me the the result of my own work and all opportunity to work on this interesting the sources I used are in the list of topic, his patient guidance, constant in- references, in accordance with the flow of new ideas and encouragement. Methodological Instructions on Eth- My thanks also go to my family and ical Principles in the Preparation of friends for their continued support. University Theses. Gustav Šourek In Prague, May 6th, 2013 Prohlašuji, že jsem předloženou práci vypracoval samostatně a že jsem uvedl veškeré použité informační zdroje v souladu s Metodickým pokynem o do- držování etických principů při přípravě vysokoškolských závěrečných prací. Gustav Šourek V praze, 6. května, 2013 iii Abstrakt / Abstract Potenciální přínos schopnosti pre- The potential value of predicting dikovat trendy v sociálních médiích trends in social media rises with its vyvstává s jejich narůstajícím vlivem growing dominance in our lives. Where- v našem každodenním životě. Zatímco as many works focus on anomaly or existuje spousta prací, zabývajících se trend detection, there is still little detekcí anomálií či trendů, stále víme knowledge on the evolution of trend málo o jejich vývoji v čase. Inspirováni dynamics. Inspired by the studies on studií šíření infekce skrz sociální síť, infection diffusion through a social net- navrhujeme popstup pro předvídání work, we propose an approach to predict trendů v lokální podsíti Twitteru, vy- trends spread within a local subnetwork užívající informaci o síťové struktuře v of Twitter, exploiting the network struc- míře, která přesahuje dosavadní práce. ture information beyond the scope of Reprezentaci anomálních vzorů v síti previous works. We base the anomaly zakládáme na grafových features, vy- pattern representation on graph fea- jadřujících různé možnosti lokálního tures, reflecting various local relational relačního uspořádání v místech pří- topology options in the context of trend tomnosti trendu. S použitím algoritmu presence. Utilizing machine learning strojového učení potom využíváme algorithm, the information extracted extrahovanou informaci pro predikci is used for prediction of future trends budoucího chování trendu a vyhodno- behavior and evaluated over several cujeme přístup na vytyčených cílech. demarcated targets. The contribution Přínos našeho grafového přístupu je po- of our graph approach is then measured měřován oproti baseline modelu, který against a baseline model, utilizing the využívá stejný postup při učení, ale same learning strategy, yet considering pokládá výskyt trendu za časovou řadu, the trends as time series, absent any bez jakékoliv znaloti o síťové struktuře. knowledge on the network topology. Kromě toho jsou testovány některé další Moreover several other approaches are přístupy pro srovnání. tested for comparison. Výsledky ukazují, že síťová struk- The results prove the network struc- tura hraje významnou úlohu při ší- ture to play an important role in the ření trendů, jelikož informace získaná trends spread dynamics, as the topology pomocí grafových features znatelně information extracted via graph fea- zlepšuje přesnost modelu, za hranice tures improves the accuracy of learner přesnosti ostatních metod. Další vy- considerably, out of the reach of other lepšení tohoto síťového přístupu může methods tested. Further feature options potenciálně skýtat v různém obohacení and combinations can be considered for features a jejich kombinacích. prospective improvements of the net- work related approach. Klíčová slova: Twitter, šíření lokál- Keywords: Twitter, local trends ních trendů, relační strojové učení spreading, relational machine learning Překlad titulu: Analýza šíření lokál- ních trendů v sociální síti Twitter iv Contents / 1 Introduction ........................1 5.3.2 Cross-validation .......... 25 1.1 Motivation .......................1 5.3.3 Test set validation ....... 25 1.2 Related work .....................2 5.3.4 Weka ..................... 25 1.3 Our approach ....................3 6 Features ........................... 27 1.3.1 Overview ...................3 6.1 Base features ................... 27 2 Social Networks ....................4 6.1.1 Frequency rankings ...... 27 2.1 Introduction ......................4 6.1.2 User features ............. 28 2.2 Digital social networks...........4 6.2 Model features ................. 28 2.3 Twitter ...........................5 6.3 Graph features ................. 28 2.4 Social Network Analysis .........6 6.3.1 Relational features ....... 29 2.4.1 Levels of analysis ..........6 6.3.2 Time features ............ 30 2.5 Trends spreading .................7 6.4 Graph features creation ....... 31 3 Data acquisition ....................9 6.4.1 Isolated feature check.... 31 3.1 Crawling strategy ................9 6.4.2 Feature set check ........ 31 3.2 Twitter API .................... 10 6.5 Isomorphism problem .......... 31 3.2.1 Functionality ............. 10 6.5.1 Calculating invariants ... 32 3.2.2 Rate limiting ............. 11 6.5.2 Isomorphic mapping ..... 32 3.2.3 Limits workaround....... 11 6.6 Feature matching .............. 33 3.3 Implementation ................ 11 6.6.1 Heuristic ordering........ 33 4 Data analysis ..................... 13 6.6.2 Search method ........... 33 4.1 Crawled data ................... 13 6.6.3 Set intersection speedup . 35 4.1.1 Statistics overview ....... 13 7 Experiments ...................... 37 4.1.2 Network structure ....... 13 7.1 Settings......................... 37 4.1.3 Trending topics .......... 17 7.1.1 Sliding window prop- 4.2 Data transformation ........... 18 erties ..................... 37 4.3 Time structures ................ 18 7.1.2 Top-k threshold .......... 40 4.3.1 Sequential representa- 7.1.3 Datasets .................. 40 tion ....................... 19 7.2 Feature options ................ 42 4.3.2 Sliding window ........... 19 7.2.1 Ranking .................. 42 4.4 Graphs ......................... 19 7.2.2 User features ............. 44 4.4.1 Relations ................. 20 7.2.3 User modeling............ 44 4.4.2 Representation: .......... 20 7.2.4 Graph features ........... 45 5 Learning ........................... 21 7.3 Results ......................... 47 5.1 Target classes .................. 21 7.3.1 Shows or stays ........... 48 5.1.1 Motivation ............... 21 7.3.2 Top-k% ................... 49 5.1.2 Basic class................ 21 7.3.3 Expands .................. 50 5.1.3 Top-K% metric .......... 22 8 Conclusion ........................ 52 5.1.4 Expands class ............ 22 8.1 Future work .................... 52 5.1.5 Enters top-K class ....... 22 References ........................ 54 5.2 Approaches ..................... 22 A Specification ...................... 57 5.2.1 Simple learner............ 22 B Used Terms ....................... 59 5.2.2 Baseline learner .......... 23 B.1 Acronyms....................... 59 5.2.3 Graph learner ............ 23 B.2 Software ........................ 59 5.2.4 User modeling............ 24 C CD content ....................... 60 5.3 Evaluation...................... 24 5.3.1 Classifiers ................ 24 v Tables / Figures 4.1. crawled datasets comparison .. 13 2.1. depiction of social network ......6 6.1. features reduction .............. 31 2.2. levels of analysis..................7 3.1. crawling strategy ............... 10 3.2. implementation of crawling .... 12 4.1. friends degree distribution ..... 15 4.2. retweets degree distribution ... 15 4.3. betw. centrality distribution... 16 4.4. time-series trend occurence .... 17 4.5. network subset trends spread .. 18 4.6. sliding window ................. 19 5.1. top-k% prediction task......... 21 6.1. size 1 features .................. 29 6.2. size 2 features .................. 29 6.3. features of size 3 ............... 30 6.4. spread potential ................ 30 6.5. causality correlation............ 30 6.6. isomorphism problem .......... 32 6.7. feature searching algorithm .... 34 6.8. feature matching algorithm .... 35 7.1. overfitting of graph learner .... 38 7.5. shows in top-k window parameters...................... 40 7.3. stays in top-k window parameters...................... 39 7.4. precision target size ordering .. 39 7.5. top-k threshold influence....... 40 7.6. datasets change re- silience baseline approach...... 41 7.7. datasets change re- silience graph approach ........ 42 7.8. ranking baseline ................ 43 7.9. ranking graph features ......... 43 7.10. user subset sampling ........... 44 7.11. user modeling topk-k% ........ 45 7.12. relations selection accuracy .... 46 7.13. time features addition.......... 46 7.14. relations selection top-k........ 47 7.15. learners accuracy collation ..... 48 7.16. shows in top-k collation ........ 48 7.17. stays in top-k collation......... 49 7.18. learners topk-k % collation .... 50 7.19. all learners collation at topk-k % ........................ 50 7.20. core learners collation at expands ...................... 51 vi Chapter 1 Introduction 1.1 Motivation Human beings have been assembling themselves into social networks for thousands of years. Forming relations like friendship, relative, or coworker relationships
Details
-
File Typepdf
-
Upload Time-
-
Content LanguagesEnglish
-
Upload UserAnonymous/Not logged-in
-
File Pages66 Page
-
File Size-