mayaokawa / opinion_dynamics

Source code of our KDD 2022 paper: Predicting Opinion Dynamics via Sociologically-Informed Neural Networks
25 stars 6 forks source link

Sociologically-Informed Neural Network (SINN)

Source code of our KDD 2022 paper: Predicting Opinion Dynamics via Sociologically-Informed Neural Networks [[Link to the paper]()]

SINN-overview

Requirements

Directory description

Data Generation & Collection

Data generation

We provide synthetic datasets in working/. But you can also generate these datasets.

Data collection

We provide sample real data in working/. But you can also query the dataset via API.

  1. Set your Bearer Token in your environment variable by running the following command in your terminal.

    export BEARER_TOKEN='<your-bearer-token>'
  2. Get tweets by query search by running

    python3 collect_twitter.py

    Get twitter probiles by username

    python3 collect_twitter_user.py  

    Get Reddit posts

    python3 collect_reddit.py

Data preprocessing

How To Use

Example of Usage

Advanced Usage

Citation

If you use this code or data, please cite the following paper:

@inproceedings{okawa2022sinn,
  author    = {Okawa, Maya and Iwata, Tomoharu},
  title     = {Predicting Opinion Dynamics via Sociologically-Informed Neural Networks},
  booktitle = {{KDD} '22: The 28th {ACM} {SIGKDD} Conference on Knowledge Discovery and Data Mining},
  pages     = {},
  year      = {2022}
}