Published April 11, 2022 | Version 0.4.0
Software Open

taupy

  • 1. ROR icon Karlsruhe Institute of Technology

Description

This repository contains taupy, version 0.4.0, together with notebooks and data for the paper “Argumentation-induced rational issue polarisation”, currently under review.

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).

It is not necessary to install taupy in order to analyse the data from the simulations reported in the paper, which can be gathered from the notebooks and zipped pandas DataFrames (see below). It is only necessary to install taupy if you want to run your own simulation experiments and/or build data from scratch. To install taupy from the source code provided here, please download and unpack taupy-v0.4.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:

'dd>=0.5.6',
'iteration_utilities>=0.11.0'
'more_itertools>=8.8.0',
'numpy>=1.19.4',
'pandas>=1.2.2',
'python_igraph>=0.9.6',
'scikit_learn>=0.24.2',
'sympy>=1.6.2',
'z3-solver>=4.8.14.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. Depending on their system configuration, Windows users who use Python 3.10 may see a request from pip to install Microsoft's Visual C++ Build Tools. A guide for how to do this is available on Stackoverflow. This software can be uninstalled when pip has completed installation. This requirement is temporary at time of uploading this repository, and it does not apply to Windows users on Python 3.9.

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 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:
    • notebooks/lineplots.ipynb compiles Figure 3 and 4.
    • notebooks/additional-lineplots.ipynb compiles Figure 5 (robustness analysis)
    • notebooks/fulldensity.ipynb compiles Figure 6 (model runs until \(D=1.0\))

Please note that some administrative files, like setup.py, README.md and the LICENSE, may contain identifying information about the author. However, there is usually no need to inspect these files.

Other versions of this record contain information about previous publications based on taupy. Researching information about these publications will reveal the name of the author.

Files

notebooks.zip

Files (79.6 MB)

Name Size Download all
md5:76598615e8a20a716347e960a6ca13ba
77.1 MB Preview Download
md5:08dc5ec83977a0682e808e368ba9307f
2.4 MB Preview Download