PySeldonlib
PySeldonlib is a Python Package for Opinion Dynamics Simulation, an extension of the
Seldon Framework. It provides:
- Tools for the simulation of various Opinion Dynamics Models like the classical DeGroot Model, Deffuant Model, Activity Driven Model, etc.
- Tools to create, manipulate, and study complex networks which are either randomly generated or provided by the user.
- A clean and robust interface for conducting the simulations.
Opinion Dynamics
Opinion dynamics is a field of study within the realm of complex systems and sociophysics that explores how opinions, beliefs, and attitudes evolve and spread within social networks. It combines elements of physics, social science, and mathematics to understand the mechanisms driving opinion formation and change under various influences, such as personal convictions, peer pressure, media impact, and societal norms.
Our work contributes to this interdisciplinary field by providing robust tools for simulation and analysis, aiding in the understanding of complex opinion dynamics phenomena Seldon-Code.
DeGroot Model Example
The DeGroot model is a model of social influence. It describes how agents in a network can reach a consensus by updating their opinions based on the opinions of their neighbors. The DeGroot model is a simple model of social influence that has been studied extensively in the literature. It is used to model a wide range of social phenomena, such as the spread of information, the formation of opinions, and the emergence of social norms.
Below is an example of reaching consensus in a network using the DeGroot model. We will create a network of 20 agents with random opinions and random connections between them. We will then conduct the simulation.
Initial Opinions
Initial opinions of the agents in the network in the range of [0,1] are shown below:
Final Opinions
Final opinions of the agents in the network after the simulation are shown below:
We can conclude that the agents have reached a consensus after the simulation.
Reference
- DeGroot, M. H. (1974). Reaching a Consensus. Journal of the American Statistical Association, 69(345), 118–121. https://doi.org/10.2307/2285509
Usage
import pyseldonlib
pyseldonlib.run_simulation_from_config_file(config_file_path = '/path/to/config/file')
import pyseldonlib
model = pyseldonlib.DeGroot_Model(max_iterations=1000,
convergence_tol=1e-6,
rng_seed=120,
other_settings=other_settings)
output_dir_path = str("./output")
model.run(output_dir_path)
Metadata
Release files for pyseldonlib 1.0.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| pyseldonlib-1.0.0.tar.gz | 3.2 MB | Details |
Built distributions (wheels)
Total release size: 23.4 MB
Release files / pyseldonlib-1.0.0.tar.gz
| Download URL | pyseldonlib-1.0.0.tar.gz |
|---|---|
| Size | 3.2 MB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
a633dd67a2c04a6825ca04f6f050035bb5348b6cd79dfe17c8452c3ac0fe57a7
|
|
BLAKE2b-256 checksum How to use checksums |
d18e65a6a604b13c665e34f33c10d8b1f64b3d9c12f799d9015b437d1d251a5a
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.1.1 CPython/3.12.5
|
Release files / pyseldonlib-1.0.0-cp313-cp313-win_amd64.whl
| Download URL | pyseldonlib-1.0.0-cp313-cp313-win_amd64.whl |
|---|---|
| Size | 656.5 kB |
| Tags | CPython 3.13 Windows x86-64 |
|
SHA-256 checksum How to use checksums |
283b523c54ea38f5322f13a42397f30c221f244e3fb6834b5c2a7a5a4e6b1259
|
|
BLAKE2b-256 checksum How to use checksums |
db48d777f537fff25adf0f477e2acafb5b2a28b9f99c1aa648e1238441c88109
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.1.1 CPython/3.12.5
|
Release files / pyseldonlib-1.0.0-cp313-cp313-musllinux_1_2_x86_64.whl
| Download URL | pyseldonlib-1.0.0-cp313-cp313-musllinux_1_2_x86_64.whl |
|---|---|
| Size | 1.6 MB |
| Tags | CPython 3.13 Linux musl 1.2+ x86-64 |
|
SHA-256 checksum How to use checksums |
a20dc006c94055a0a651c3bf7573abce7d221ce7b9a42626023c8f3d72fbfd0d
|
|
BLAKE2b-256 checksum How to use checksums |
150bc10149d038a32e572d7205fb6e4bac622f2cc10ef9b6b394e1afa12295a6
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.1.1 CPython/3.12.5
|
Release files / pyseldonlib-1.0.0-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
| Download URL | pyseldonlib-1.0.0-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl |
|---|---|
| Size | 763.8 kB |
| Tags | CPython 3.13 Linux glibc 2.17+ x86-64 |
|
SHA-256 checksum How to use checksums |
c55d68459c8619fae0285b5994551cc0a1def9bd987d26536180f8f5268b8b8f
|
|
BLAKE2b-256 checksum How to use checksums |
df5f35b0bf4da8667bf2dcda3bbc1a8c1670d7de120f925cfd08289b2be69745
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.1.1 CPython/3.12.5
|
Release files / pyseldonlib-1.0.0-cp313-cp313-macosx_12_6_x86_64.whl
| Download URL | pyseldonlib-1.0.0-cp313-cp313-macosx_12_6_x86_64.whl |
|---|---|
| Size | 539.7 kB |
| Tags | CPython 3.13 macosx 12 6 x86 64 |
|
SHA-256 checksum How to use checksums |
dbcfa97a4b539f3ed61fd5ed98c8218206f408d97d03c70615846944bf988433
|
|
BLAKE2b-256 checksum How to use checksums |
86fc4f9827ef61cccb7e6ed66277fd376139bb08cc663afc2f3c415a2dc3dd9b
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.1.1 CPython/3.12.5
|
Release files / pyseldonlib-1.0.0-cp313-cp313-macosx_12_6_arm64.whl
| Download URL | pyseldonlib-1.0.0-cp313-cp313-macosx_12_6_arm64.whl |
|---|---|
| Size | 514.5 kB |
| Tags | CPython 3.13 macosx 12 6 arm64 |
|
SHA-256 checksum How to use checksums |
7fb09aaf66be9b537247db29f753539ab4f6a7423e8aa58e91bc933101dfa4e6
|
|
BLAKE2b-256 checksum How to use checksums |
4d483909529e5739d6b5e4d869b846ea617fa849e98741465d8b78bf0c752ea2
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.1.1 CPython/3.12.5
|
Release files / pyseldonlib-1.0.0-cp312-cp312-win_amd64.whl
| Download URL | pyseldonlib-1.0.0-cp312-cp312-win_amd64.whl |
|---|---|
| Size | 656.5 kB |
| Tags | CPython 3.12 Windows x86-64 |
|
SHA-256 checksum How to use checksums |
bf827e200420f44e6f1256d2eda95661a775ea80d20e314cda38a537edb90c02
|
|
BLAKE2b-256 checksum How to use checksums |
05fbe104287e9c0268e451a0c2525cf63fc3d06544e56b0a0b2d24653625e4ce
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.1.1 CPython/3.12.5
|
Release files / pyseldonlib-1.0.0-cp312-cp312-musllinux_1_2_x86_64.whl
| Download URL | pyseldonlib-1.0.0-cp312-cp312-musllinux_1_2_x86_64.whl |
|---|---|
| Size | 1.6 MB |
| Tags | CPython 3.12 Linux musl 1.2+ x86-64 |
|
SHA-256 checksum How to use checksums |
f7441925cc42c3514b3fa6b9a4859c4b98631f1639c6da9727bd7f3006b010f5
|
|
BLAKE2b-256 checksum How to use checksums |
8c9fa336746d0eede99502405dcd4a08a405bfcfb3b240334fbffb8dc9f29e9e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.1.1 CPython/3.12.5
|
Release files / pyseldonlib-1.0.0-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
| Download URL | pyseldonlib-1.0.0-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl |
|---|---|
| Size | 763.9 kB |
| Tags | CPython 3.12 Linux glibc 2.17+ x86-64 |
|
SHA-256 checksum How to use checksums |
836a93cd5bed81c3f07962c6f536c45b257b51e9d1f068c977607b3fed35c1a3
|
|
BLAKE2b-256 checksum How to use checksums |
dbb44fc60df0899f49c4d723b21fae9d450bb5fdc48650e3f9db0f85fb05ee9b
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.1.1 CPython/3.12.5
|
Release files / pyseldonlib-1.0.0-cp312-cp312-macosx_12_6_x86_64.whl
| Download URL | pyseldonlib-1.0.0-cp312-cp312-macosx_12_6_x86_64.whl |
|---|---|
| Size | 539.7 kB |
| Tags | CPython 3.12 macosx 12 6 x86 64 |
|
SHA-256 checksum How to use checksums |
aaeb3fb64fa47cb395b9e216f51036dbcad67c7bb0590c7af20743752b8a5660
|
|
BLAKE2b-256 checksum How to use checksums |
b0373966c33023e303e4144339a4459b3343809ad8e67f7bf69b494a3efbe8e3
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.1.1 CPython/3.12.5
|
Release files / pyseldonlib-1.0.0-cp312-cp312-macosx_12_6_arm64.whl
| Download URL | pyseldonlib-1.0.0-cp312-cp312-macosx_12_6_arm64.whl |
|---|---|
| Size | 514.5 kB |
| Tags | CPython 3.12 macosx 12 6 arm64 |
|
SHA-256 checksum How to use checksums |
f3be8c248952b054eae7d2b266b5e1a358933fec80f455b1768e8e68302ee7e1
|
|
BLAKE2b-256 checksum How to use checksums |
fae731906f3ec9d6d6cdb633b2ddaed746ebe1a6a6357cc6b4edcebf40ee64c4
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.1.1 CPython/3.12.5
|
Release files / pyseldonlib-1.0.0-cp311-cp311-win_amd64.whl
| Download URL | pyseldonlib-1.0.0-cp311-cp311-win_amd64.whl |
|---|---|
| Size | 658.5 kB |
| Tags | CPython 3.11 Windows x86-64 |
|
SHA-256 checksum How to use checksums |
c18acd555e7a574ff3c1a7672e759d364cd57d73911f8dfcceedf3ca94294627
|
|
BLAKE2b-256 checksum How to use checksums |
1f2f79ee2c7625512c0b94be125465e4e64a2f36000244a6b4d49520af88820d
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.1.1 CPython/3.12.5
|
Release files / pyseldonlib-1.0.0-cp311-cp311-musllinux_1_2_x86_64.whl
| Download URL | pyseldonlib-1.0.0-cp311-cp311-musllinux_1_2_x86_64.whl |
|---|---|
| Size | 1.6 MB |
| Tags | CPython 3.11 Linux musl 1.2+ x86-64 |
|
SHA-256 checksum How to use checksums |
1064007a175528eebe558db1e4052ef57b049d1c84bc60897dc62030f97a367e
|
|
BLAKE2b-256 checksum How to use checksums |
f176270e23852f80d9eea4a8e4d68684ad1b7e6e8063ea1d908f86dba2c1d8e6
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.1.1 CPython/3.12.5
|
Release files / pyseldonlib-1.0.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
| Download URL | pyseldonlib-1.0.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl |
|---|---|
| Size | 764.3 kB |
| Tags | CPython 3.11 Linux glibc 2.17+ x86-64 |
|
SHA-256 checksum How to use checksums |
af39b27cac52fedafbe424ce51922f2fc7fff066b54e5a157b48901d13448e03
|
|
BLAKE2b-256 checksum How to use checksums |
8ae5b88f0305833fdcfec3419d4e4535db9db2933245145fe615d16d78093a8a
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.1.1 CPython/3.12.5
|
Release files / pyseldonlib-1.0.0-cp311-cp311-macosx_12_6_x86_64.whl
| Download URL | pyseldonlib-1.0.0-cp311-cp311-macosx_12_6_x86_64.whl |
|---|---|
| Size | 524.1 kB |
| Tags | CPython 3.11 macosx 12 6 x86 64 |
|
SHA-256 checksum How to use checksums |
02a095e9366744a680115743d15d590fca6ef8bdd3ae03b4419bc156ff6c48ed
|
|
BLAKE2b-256 checksum How to use checksums |
4c43b031e474b4733d37c4b2ba39956d9bf31407f7fe38c55acf8d0f0c8659e9
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.1.1 CPython/3.12.5
|
Release files / pyseldonlib-1.0.0-cp311-cp311-macosx_12_6_arm64.whl
| Download URL | pyseldonlib-1.0.0-cp311-cp311-macosx_12_6_arm64.whl |
|---|---|
| Size | 499.4 kB |
| Tags | CPython 3.11 macosx 12 6 arm64 |
|
SHA-256 checksum How to use checksums |
46a40fd363016a5527e84aaab64e3c623a43ca5e90a1054888abd4cd5a047330
|
|
BLAKE2b-256 checksum How to use checksums |
7c5cb7415394ebf3b484b715108a80e3d4c14c4046ca29cc7cc9d82fb6e03816
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.1.1 CPython/3.12.5
|
Release files / pyseldonlib-1.0.0-cp310-cp310-win_amd64.whl
| Download URL | pyseldonlib-1.0.0-cp310-cp310-win_amd64.whl |
|---|---|
| Size | 656.3 kB |
| Tags | CPython 3.10 Windows x86-64 |
|
SHA-256 checksum How to use checksums |
20ca16c1dcdd3e9c8e2122077363fde9d6f29132e59acb03b8a11d9a4888f44a
|
|
BLAKE2b-256 checksum How to use checksums |
3c7577960fa9284bcf05424a0b122de45ccea8416d444cb72cab112faba58703
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.1.1 CPython/3.12.5
|
Release files / pyseldonlib-1.0.0-cp310-cp310-musllinux_1_2_x86_64.whl
| Download URL | pyseldonlib-1.0.0-cp310-cp310-musllinux_1_2_x86_64.whl |
|---|---|
| Size | 1.6 MB |
| Tags | CPython 3.10 Linux musl 1.2+ x86-64 |
|
SHA-256 checksum How to use checksums |
1d0d1ae17f1574b4654290cc8407ea113a5f75cb9e77686f62e9c7626af13fd7
|
|
BLAKE2b-256 checksum How to use checksums |
3a57199cb7440700b46faec204030c24c71b4e1dd044f8271f30a55837e642d2
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.1.1 CPython/3.12.5
|
Release files / pyseldonlib-1.0.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
| Download URL | pyseldonlib-1.0.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl |
|---|---|
| Size | 763.0 kB |
| Tags | CPython 3.10 Linux glibc 2.17+ x86-64 |
|
SHA-256 checksum How to use checksums |
3b0d53e20ce44b13a235539d813a2498df88c204e27e41ffa7a8db4b543f3bff
|
|
BLAKE2b-256 checksum How to use checksums |
fd4acdeecd5298d643a202e59fe43c19504ef7c3698095eef62cbc91946250a8
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.1.1 CPython/3.12.5
|
Release files / pyseldonlib-1.0.0-cp310-cp310-macosx_12_6_x86_64.whl
| Download URL | pyseldonlib-1.0.0-cp310-cp310-macosx_12_6_x86_64.whl |
|---|---|
| Size | 522.8 kB |
| Tags | CPython 3.10 macosx 12 6 x86 64 |
|
SHA-256 checksum How to use checksums |
32f66502bd3c59158f611d03e402868ec6055fcc005c025878926d8e8ddb5a19
|
|
BLAKE2b-256 checksum How to use checksums |
6db0a0251fc7f8b69aa6383864af5c9441295868f149dc0555798ae49d3db230
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.1.1 CPython/3.12.5
|
Release files / pyseldonlib-1.0.0-cp310-cp310-macosx_12_6_arm64.whl
| Download URL | pyseldonlib-1.0.0-cp310-cp310-macosx_12_6_arm64.whl |
|---|---|
| Size | 498.7 kB |
| Tags | CPython 3.10 macosx 12 6 arm64 |
|
SHA-256 checksum How to use checksums |
fbb46fca55044c31043bb3c2aefbd3f20e246203262fa9fe53d7db5c3de3c967
|
|
BLAKE2b-256 checksum How to use checksums |
a218bfd79218302e9faeb1e733f208fb705d3e8da12a2a90f781dc11737d26ac
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.1.1 CPython/3.12.5
|
Release files / pyseldonlib-1.0.0-cp39-cp39-win_amd64.whl
| Download URL | pyseldonlib-1.0.0-cp39-cp39-win_amd64.whl |
|---|---|
| Size | 656.5 kB |
| Tags | CPython 3.9 Windows x86-64 |
|
SHA-256 checksum How to use checksums |
837c6c3cec0920ac0bfcbb0be7781d84d7195d9e13a50ce0b9bd21f4064a698b
|
|
BLAKE2b-256 checksum How to use checksums |
dd5ac3330d2958845345198565cb8d27c29bf8a4eefcddd8a886696d46c26b31
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.1.1 CPython/3.12.5
|
Release files / pyseldonlib-1.0.0-cp39-cp39-musllinux_1_2_x86_64.whl
| Download URL | pyseldonlib-1.0.0-cp39-cp39-musllinux_1_2_x86_64.whl |
|---|---|
| Size | 1.6 MB |
| Tags | CPython 3.9 Linux musl 1.2+ x86-64 |
|
SHA-256 checksum How to use checksums |
64adac235ee4346cc5026c21a91074eaffac0ed6ee7958c22e908c7adcc203b5
|
|
BLAKE2b-256 checksum How to use checksums |
eab81f8d80be20ddf9f4b5fffd6462f1c06f90044e5cc8a5d78256eb35139c4a
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.1.1 CPython/3.12.5
|
Release files / pyseldonlib-1.0.0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
| Download URL | pyseldonlib-1.0.0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl |
|---|---|
| Size | 763.2 kB |
| Tags | CPython 3.9 Linux glibc 2.17+ x86-64 |
|
SHA-256 checksum How to use checksums |
575ff03e334ac4e8cd497940c9b82ffbb251805c03184afbd25ca852b4a6c730
|
|
BLAKE2b-256 checksum How to use checksums |
9c10c3270775c62fb5edeba90ed3ba791660fad83a5830feebe9ed028c42a5ae
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.1.1 CPython/3.12.5
|
Release files / pyseldonlib-1.0.0-cp39-cp39-macosx_12_6_x86_64.whl
| Download URL | pyseldonlib-1.0.0-cp39-cp39-macosx_12_6_x86_64.whl |
|---|---|
| Size | 522.9 kB |
| Tags | CPython 3.9 macosx 12 6 x86 64 |
|
SHA-256 checksum How to use checksums |
c03c38ebb4604e9ba946095be7bac0acd95c6656d681a9eaaa0c899eb8c3b515
|
|
BLAKE2b-256 checksum How to use checksums |
85ebf2c8dc9814f56219061c7a7d3cb15e2c1b430f23414e094389d46c3f91ea
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.1.1 CPython/3.12.5
|
Release files / pyseldonlib-1.0.0-cp39-cp39-macosx_12_6_arm64.whl
| Download URL | pyseldonlib-1.0.0-cp39-cp39-macosx_12_6_arm64.whl |
|---|---|
| Size | 498.7 kB |
| Tags | CPython 3.9 macosx 12 6 arm64 |
|
SHA-256 checksum How to use checksums |
a956ff2ccee205154344d7db2b308b38a0c9114397862dec472aefec4bd64094
|
|
BLAKE2b-256 checksum How to use checksums |
4dd08655d240f1552e6a9ad8f3410a9998c77b3d5fa4df2eddf751dfc8f564cb
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.1.1 CPython/3.12.5
|