Authors:
Options
git clone [email protected]:ChrisCurrin/opinion_dynamics.git
git clone https://github.com/ChrisCurrin/opinion_dynamics.git
cd opinion_dynamics
2. Create environment from requirements using conda
conda env create -f environment.yml
conda activate opinion_dynamics
Target Python version: >= 3.6
jupter notebook opdynamics.ipynb
jupter lab opdynamics.ipynb
python -m scripts.<script name>
e.g.
python -m opdynamics --plot=all
Run a simulation with noise with the -D <value>
parameter.
python -m opdynamics 1000 10 2 3 -D 0.01 -beta 2 --activity negpowerlaw 2.1 1e-2 -r 0.5 -T 10 --plot summary --save -v
Compare noise parameters by passing multiple values to -D
python -m opdynamics 1000 10 2 3 -D 0.01 0.1 -beta 2 --activity negpowerlaw 2.1 1e-2 -r 0.5 -T 10 --plot summary --save -v
Note that the code is formatted using the black Python module.
Update environment.yml
using conda env export --from-history > environment.yml
- Use alternate peak detection alogiorthms
- Equations:
- Allow
simulation.run_product
to be run asyncronously. - Create metric for determining whether opinions are polarised or uniform.
- Add
sample_size
toSampleChamber.__repr__
- Test more efficient
get_social_interaction
- Test more efficient
get_connection_probabilities
- Test and plot results for "internal noise".
- Restrict internal noise to be from an agent of opposite opinion.
- Implement noise as coming from agent - "internal noise".
- [low priority] Implement other SDE solvers using https://pypi.org/project/diffeqpy/
- change density activity vs opinion plot to be density per activity
- Apply noise after time
- Calculate and