Coder Social home page Coder Social logo

decade-rider / opiniondynamics Goto Github PK

View Code? Open in Web Editor NEW

This project forked from blnik/opiniondynamics

0.0 0.0 0.0 2.71 MB

The repository contains all code used to generate the figures of the project report for the following models: original Hegselmann-Krause, ODE, SDE and PDE.

Jupyter Notebook 100.00%

opiniondynamics's Introduction

OpinionDynamics

The repository contains all the code that was used to create the plots for the report

Some of the code takes a while to run and is therefore commented out. The corresponding results of the code that is commented out can be found in the savedResults directory.

Hegselmann-Krause models

Code available in HK.ipynb

  • Figure 1.1: some basic sample simulations
  • Figure 1.4: comparison: average number of clusters, 2R-conjecture, trace method (symmetric case)
  • Figure 1.5: average number of clusters on (e_l, e_r)-grid
  • Figure 1.6: comparison: average number of clusters, 2R-conjecture, trace method (fixed asymmetry)
  • Figure 1.7: same as 1.6 for larger e_l, e_r
  • Figure 1.8: sample simulations fixed asymmetry
  • Figure 1.11: comparison: average number of clusters, 2R-conjecture, trace method (opinion dependent asymmetry)

ODE models

Code available in ODE.ipynb

  • Figure 2.1: sample simulations (comparison sum and average of differences)
  • Figure 2.2: comparison average number of clusters (sum and average of differences)
  • Figure 2.3: average number of clusters on (e_l, e_r)-grid
  • Figure 2.4: sample simulation opinion dependent asymmetry
  • Figure 2.5: average number of clusters for opinion dependent asymmetry: (e,m)-grid

SDE models

Code available in SDE.ipynb

  • Figure 3.1: sample simulation naive SDE model
  • Figure 3.3: simulation of expected trajectories
  • Figure 3.4: sample simulations with order parameter
  • Figure 3.5: average order parameter on (e, s)-grid
  • Figure 3.6: sample simulations for specific points on grid
  • Figure 3.8: sample simulations fixed asymmetry
  • Figure 3.9: sample simulations fixed asymmetry with mean
  • Figure 3.10: average period of mean

PDE models

Code available in PDE.ipynb

  • Figure 4.1: sample simulations symmetric PDE model
  • Figure 4.2: peak position and time derivative at time 0 and x=0.5 on (e, s)-grid
  • Figure 4.5: sample simulations asymmetric PDE model
  • Figure 4.6: position of peak as function of time
  • Figure 4.7: period of peak as function of s

opiniondynamics's People

Contributors

blnik avatar nikolaischeer avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.