我在github(https://github.com/bonzanini/Book-SocialMediaMiningPython/blob/master/Chap02-03/twitter_cluster_users.py)上找到了这段代码,可以根据twitter上的bios使用k-means对用户配置文件进行聚类。我有一个.jsonl文件,其中有以下格式的行:
{"id": 66634375, "id_str": "66634375", "name": "JonathanvanderGeer", "screen_name": "jonathanvdgeer", "location": "\u00dcT: 52.079226,4.282848", "description": "politiek adviseur van vice-premier en LNV-minister Carola Schouten| gelovig|familiemens|levensgenieter|1984|hardloper|toneel|RvT-lid theaterschool Rabarber"....}
但打印时我需要知道bios的用户名群集。如何我可以吗? 我想在这个集群中添加位置信息。将位置作为第二列添加到矩阵中,并使用这两个特性计算tfidf。我怎么能做到呢?在
^{pr2}$
目前没有回答
相关问题 更多 >
编程相关推荐