There is a newer version of this record available.

Software Open Access

taupy

Anonymous

This repository contains taupy, version 0.2.0, together with notebooks and data for the paper “Arguments as drivers of issue polarisation in debates among artificial agents”, currently under review in JASSS.

taupy serves as an implementation of the TDS model described in the paper. It requires Python ≥ 3.9 and pip (available by default given Python 3.9). To install taupy from the source code provided here, please download and unpack taupy-v0.2.0.zip and use pip from the command line in the parent folder:

python -m pip install taupy/

This will install the following dependencies, if not already present (Users on Apple Silicon currently can't install scikit-learn via pip, and need to follow specific instructions. For users who do not want to get involved with installing the dependencies manually, it is currently advisable to install and run taupy on a x86 architecture):

'sympy>=1.6.2',
'dd>=0.5.6',
'numpy>=1.19.4',
'pandas>=1.2.2',
'python_igraph>=0.9.6',
'scikit_learn>=0.24.2',
'more_itertools>=8.8.0'

If you are on a Linux operating system, dd will automatically install the dd.cudd module which contains a compiled version of CUDD. On Windows and Mac OS, dd will not automatically install CUDD, and taupy will rely on dd's pure Python implementation of binary decision diagrams instead. This does not have implications for functionality, but may have for computation time.

The notebooks are in the notebooks folder and they contain the information that one needs to pass to taupy in order to obtain the results presented in the paper. The notebooks contain additional documentation of this code. Except for experiments.ipnyb, the notebooks do not require taupy to tun, but they do require ipykernel and some common scientific Python packages, such as numpy. The requirements of the individual notebooks are all listed in the first cell of each notebook.

The workflow to create the simulation results from scratch is as follows:

  1. Begin by running the experiments (notebooks/experiments.ipynb) or select the pre-compiled simulation runs (notebooks/data/*pkl) or raw polarisation values (notebooks/data/*zip). Please note that running the experiments in the original settings will not be possible without access to an HPC, and generating the raw polarisation values from the pickled simulations (*pkl) will be intensive as well, in particular concerning the RAM. However, small toy experiments can be run on any personal computer. So it's recommended to work on the pre-compiled results (from the notebooks/data/*zip) files.
  2. There are a number of different notebooks, depending on which data you'd like to analyse and which output you'd like to achieve:
    • Use notebooks/ari-analysis.ipynb to visualise the results of the ARI analysis (Figure 10 in Appendix B)
    • Use notebooks/distributions.ipynb to compile Figure 6 and Table 2.
    • notebooks/lineplots.ipynb compiles Figure 3, 5, and 7.
    • notebooks/subset_clust-initially-polarised.ipynb has the data for Figures 8 and 9 (Robustness analysis)
    • notebooks/auxiliary-analysis.ipynb compiles Figures 11 and 12 in Appendix B.
    • notebooks/heatmaps.ipynb compiles the additional data Figures from Appendix C.

Please note that some administrative files, like setup.py and the LICENSE, may contain identifying information about the author.

Files (376.8 MB)
Name Size
notebooks.zip
md5:90d9dc7f2a1fa2fcb39b19d4d40552b4
376.8 MB Download
taupy-v0.2.0.zip
md5:24100f575e25178f7bad4ff88b27f9d5
27.7 kB Download
167
12
views
downloads
All versions This version
Views 16772
Downloads 127
Data volume 1.7 GB1.1 GB
Unique views 12261
Unique downloads 95

Share

Cite as