Python Bindings for the Seldon Framework
Project description
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)
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distributions
File details
Details for the file pyseldonlib-1.0.0.tar.gz
.
File metadata
- Download URL: pyseldonlib-1.0.0.tar.gz
- Upload date:
- Size: 3.2 MB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.12.5
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | a633dd67a2c04a6825ca04f6f050035bb5348b6cd79dfe17c8452c3ac0fe57a7 |
|
MD5 | ad3e261466994ce441d90c0bf9fe1138 |
|
BLAKE2b-256 | d18e65a6a604b13c665e34f33c10d8b1f64b3d9c12f799d9015b437d1d251a5a |
File details
Details for the file pyseldonlib-1.0.0-cp313-cp313-win_amd64.whl
.
File metadata
- Download URL: pyseldonlib-1.0.0-cp313-cp313-win_amd64.whl
- Upload date:
- Size: 656.5 kB
- Tags: CPython 3.13, Windows x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.12.5
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 283b523c54ea38f5322f13a42397f30c221f244e3fb6834b5c2a7a5a4e6b1259 |
|
MD5 | a2ba7cfa2c3b1a5fed825899306bc65c |
|
BLAKE2b-256 | db48d777f537fff25adf0f477e2acafb5b2a28b9f99c1aa648e1238441c88109 |
File details
Details for the file pyseldonlib-1.0.0-cp313-cp313-musllinux_1_2_x86_64.whl
.
File metadata
- Download URL: pyseldonlib-1.0.0-cp313-cp313-musllinux_1_2_x86_64.whl
- Upload date:
- Size: 1.6 MB
- Tags: CPython 3.13, musllinux: musl 1.2+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.12.5
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | a20dc006c94055a0a651c3bf7573abce7d221ce7b9a42626023c8f3d72fbfd0d |
|
MD5 | cd86e08d6b8fe1d1c010d8c6e357e60b |
|
BLAKE2b-256 | 150bc10149d038a32e572d7205fb6e4bac622f2cc10ef9b6b394e1afa12295a6 |
File details
Details for the file pyseldonlib-1.0.0-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
.
File metadata
- Download URL: pyseldonlib-1.0.0-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
- Upload date:
- Size: 763.8 kB
- Tags: CPython 3.13, manylinux: glibc 2.17+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.12.5
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | c55d68459c8619fae0285b5994551cc0a1def9bd987d26536180f8f5268b8b8f |
|
MD5 | d9ae2078b57256b51bee81e6b7f43091 |
|
BLAKE2b-256 | df5f35b0bf4da8667bf2dcda3bbc1a8c1670d7de120f925cfd08289b2be69745 |
File details
Details for the file pyseldonlib-1.0.0-cp313-cp313-macosx_12_6_x86_64.whl
.
File metadata
- Download URL: pyseldonlib-1.0.0-cp313-cp313-macosx_12_6_x86_64.whl
- Upload date:
- Size: 539.7 kB
- Tags: CPython 3.13, macOS 12.6+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.12.5
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | dbcfa97a4b539f3ed61fd5ed98c8218206f408d97d03c70615846944bf988433 |
|
MD5 | 6544502cf6bfe0a27a1de18e29184efc |
|
BLAKE2b-256 | 86fc4f9827ef61cccb7e6ed66277fd376139bb08cc663afc2f3c415a2dc3dd9b |
File details
Details for the file pyseldonlib-1.0.0-cp313-cp313-macosx_12_6_arm64.whl
.
File metadata
- Download URL: pyseldonlib-1.0.0-cp313-cp313-macosx_12_6_arm64.whl
- Upload date:
- Size: 514.5 kB
- Tags: CPython 3.13, macOS 12.6+ ARM64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.12.5
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7fb09aaf66be9b537247db29f753539ab4f6a7423e8aa58e91bc933101dfa4e6 |
|
MD5 | b2ec11d6c25ef58b5221fca6f14349f9 |
|
BLAKE2b-256 | 4d483909529e5739d6b5e4d869b846ea617fa849e98741465d8b78bf0c752ea2 |
File details
Details for the file pyseldonlib-1.0.0-cp312-cp312-win_amd64.whl
.
File metadata
- Download URL: pyseldonlib-1.0.0-cp312-cp312-win_amd64.whl
- Upload date:
- Size: 656.5 kB
- Tags: CPython 3.12, Windows x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.12.5
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | bf827e200420f44e6f1256d2eda95661a775ea80d20e314cda38a537edb90c02 |
|
MD5 | 73419fc265b71d6891e7d715973f9ab4 |
|
BLAKE2b-256 | 05fbe104287e9c0268e451a0c2525cf63fc3d06544e56b0a0b2d24653625e4ce |
File details
Details for the file pyseldonlib-1.0.0-cp312-cp312-musllinux_1_2_x86_64.whl
.
File metadata
- Download URL: pyseldonlib-1.0.0-cp312-cp312-musllinux_1_2_x86_64.whl
- Upload date:
- Size: 1.6 MB
- Tags: CPython 3.12, musllinux: musl 1.2+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.12.5
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | f7441925cc42c3514b3fa6b9a4859c4b98631f1639c6da9727bd7f3006b010f5 |
|
MD5 | a5949201e39592e0daa7ccffd3f4aa29 |
|
BLAKE2b-256 | 8c9fa336746d0eede99502405dcd4a08a405bfcfb3b240334fbffb8dc9f29e9e |
File details
Details for the file pyseldonlib-1.0.0-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
.
File metadata
- Download URL: pyseldonlib-1.0.0-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
- Upload date:
- Size: 763.9 kB
- Tags: CPython 3.12, manylinux: glibc 2.17+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.12.5
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 836a93cd5bed81c3f07962c6f536c45b257b51e9d1f068c977607b3fed35c1a3 |
|
MD5 | 9c6712d8a7fb76e300c6955fe8f008f8 |
|
BLAKE2b-256 | dbb44fc60df0899f49c4d723b21fae9d450bb5fdc48650e3f9db0f85fb05ee9b |
File details
Details for the file pyseldonlib-1.0.0-cp312-cp312-macosx_12_6_x86_64.whl
.
File metadata
- Download URL: pyseldonlib-1.0.0-cp312-cp312-macosx_12_6_x86_64.whl
- Upload date:
- Size: 539.7 kB
- Tags: CPython 3.12, macOS 12.6+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.12.5
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | aaeb3fb64fa47cb395b9e216f51036dbcad67c7bb0590c7af20743752b8a5660 |
|
MD5 | d6f3ac28889db98b9a192cebf5f06fb2 |
|
BLAKE2b-256 | b0373966c33023e303e4144339a4459b3343809ad8e67f7bf69b494a3efbe8e3 |
File details
Details for the file pyseldonlib-1.0.0-cp312-cp312-macosx_12_6_arm64.whl
.
File metadata
- Download URL: pyseldonlib-1.0.0-cp312-cp312-macosx_12_6_arm64.whl
- Upload date:
- Size: 514.5 kB
- Tags: CPython 3.12, macOS 12.6+ ARM64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.12.5
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | f3be8c248952b054eae7d2b266b5e1a358933fec80f455b1768e8e68302ee7e1 |
|
MD5 | dc290b6fd62c41d7d4901d693aa2dd39 |
|
BLAKE2b-256 | fae731906f3ec9d6d6cdb633b2ddaed746ebe1a6a6357cc6b4edcebf40ee64c4 |
File details
Details for the file pyseldonlib-1.0.0-cp311-cp311-win_amd64.whl
.
File metadata
- Download URL: pyseldonlib-1.0.0-cp311-cp311-win_amd64.whl
- Upload date:
- Size: 658.5 kB
- Tags: CPython 3.11, Windows x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.12.5
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | c18acd555e7a574ff3c1a7672e759d364cd57d73911f8dfcceedf3ca94294627 |
|
MD5 | 5d967538db691165dfd338ced30a9441 |
|
BLAKE2b-256 | 1f2f79ee2c7625512c0b94be125465e4e64a2f36000244a6b4d49520af88820d |
File details
Details for the file pyseldonlib-1.0.0-cp311-cp311-musllinux_1_2_x86_64.whl
.
File metadata
- Download URL: pyseldonlib-1.0.0-cp311-cp311-musllinux_1_2_x86_64.whl
- Upload date:
- Size: 1.6 MB
- Tags: CPython 3.11, musllinux: musl 1.2+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.12.5
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1064007a175528eebe558db1e4052ef57b049d1c84bc60897dc62030f97a367e |
|
MD5 | 86376633c5282ba5a5d500967f16d280 |
|
BLAKE2b-256 | f176270e23852f80d9eea4a8e4d68684ad1b7e6e8063ea1d908f86dba2c1d8e6 |
File details
Details for the file pyseldonlib-1.0.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
.
File metadata
- Download URL: pyseldonlib-1.0.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
- Upload date:
- Size: 764.3 kB
- Tags: CPython 3.11, manylinux: glibc 2.17+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.12.5
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | af39b27cac52fedafbe424ce51922f2fc7fff066b54e5a157b48901d13448e03 |
|
MD5 | 6d63b732bb9e76e918529e1073761ac9 |
|
BLAKE2b-256 | 8ae5b88f0305833fdcfec3419d4e4535db9db2933245145fe615d16d78093a8a |
File details
Details for the file pyseldonlib-1.0.0-cp311-cp311-macosx_12_6_x86_64.whl
.
File metadata
- Download URL: pyseldonlib-1.0.0-cp311-cp311-macosx_12_6_x86_64.whl
- Upload date:
- Size: 524.1 kB
- Tags: CPython 3.11, macOS 12.6+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.12.5
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 02a095e9366744a680115743d15d590fca6ef8bdd3ae03b4419bc156ff6c48ed |
|
MD5 | 52d57cb98bdb185e3e5bb13e5835905f |
|
BLAKE2b-256 | 4c43b031e474b4733d37c4b2ba39956d9bf31407f7fe38c55acf8d0f0c8659e9 |
File details
Details for the file pyseldonlib-1.0.0-cp311-cp311-macosx_12_6_arm64.whl
.
File metadata
- Download URL: pyseldonlib-1.0.0-cp311-cp311-macosx_12_6_arm64.whl
- Upload date:
- Size: 499.4 kB
- Tags: CPython 3.11, macOS 12.6+ ARM64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.12.5
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 46a40fd363016a5527e84aaab64e3c623a43ca5e90a1054888abd4cd5a047330 |
|
MD5 | 17e65357fd3e177e8662ffda08971569 |
|
BLAKE2b-256 | 7c5cb7415394ebf3b484b715108a80e3d4c14c4046ca29cc7cc9d82fb6e03816 |
File details
Details for the file pyseldonlib-1.0.0-cp310-cp310-win_amd64.whl
.
File metadata
- Download URL: pyseldonlib-1.0.0-cp310-cp310-win_amd64.whl
- Upload date:
- Size: 656.3 kB
- Tags: CPython 3.10, Windows x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.12.5
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 20ca16c1dcdd3e9c8e2122077363fde9d6f29132e59acb03b8a11d9a4888f44a |
|
MD5 | 99c52659d8b4cf95dc5271b90af9f64c |
|
BLAKE2b-256 | 3c7577960fa9284bcf05424a0b122de45ccea8416d444cb72cab112faba58703 |
File details
Details for the file pyseldonlib-1.0.0-cp310-cp310-musllinux_1_2_x86_64.whl
.
File metadata
- Download URL: pyseldonlib-1.0.0-cp310-cp310-musllinux_1_2_x86_64.whl
- Upload date:
- Size: 1.6 MB
- Tags: CPython 3.10, musllinux: musl 1.2+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.12.5
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1d0d1ae17f1574b4654290cc8407ea113a5f75cb9e77686f62e9c7626af13fd7 |
|
MD5 | ed37b1f06e6a519e742709444567f886 |
|
BLAKE2b-256 | 3a57199cb7440700b46faec204030c24c71b4e1dd044f8271f30a55837e642d2 |
File details
Details for the file pyseldonlib-1.0.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
.
File metadata
- Download URL: pyseldonlib-1.0.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
- Upload date:
- Size: 763.0 kB
- Tags: CPython 3.10, manylinux: glibc 2.17+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.12.5
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3b0d53e20ce44b13a235539d813a2498df88c204e27e41ffa7a8db4b543f3bff |
|
MD5 | 3dc733e60e69eb2a4d9bab19986dbc82 |
|
BLAKE2b-256 | fd4acdeecd5298d643a202e59fe43c19504ef7c3698095eef62cbc91946250a8 |
File details
Details for the file pyseldonlib-1.0.0-cp310-cp310-macosx_12_6_x86_64.whl
.
File metadata
- Download URL: pyseldonlib-1.0.0-cp310-cp310-macosx_12_6_x86_64.whl
- Upload date:
- Size: 522.8 kB
- Tags: CPython 3.10, macOS 12.6+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.12.5
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 32f66502bd3c59158f611d03e402868ec6055fcc005c025878926d8e8ddb5a19 |
|
MD5 | 862b3fd05ba42a20111dd455e411fcaa |
|
BLAKE2b-256 | 6db0a0251fc7f8b69aa6383864af5c9441295868f149dc0555798ae49d3db230 |
File details
Details for the file pyseldonlib-1.0.0-cp310-cp310-macosx_12_6_arm64.whl
.
File metadata
- Download URL: pyseldonlib-1.0.0-cp310-cp310-macosx_12_6_arm64.whl
- Upload date:
- Size: 498.7 kB
- Tags: CPython 3.10, macOS 12.6+ ARM64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.12.5
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | fbb46fca55044c31043bb3c2aefbd3f20e246203262fa9fe53d7db5c3de3c967 |
|
MD5 | 4843769b731464918c722ee4c86c908c |
|
BLAKE2b-256 | a218bfd79218302e9faeb1e733f208fb705d3e8da12a2a90f781dc11737d26ac |
File details
Details for the file pyseldonlib-1.0.0-cp39-cp39-win_amd64.whl
.
File metadata
- Download URL: pyseldonlib-1.0.0-cp39-cp39-win_amd64.whl
- Upload date:
- Size: 656.5 kB
- Tags: CPython 3.9, Windows x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.12.5
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 837c6c3cec0920ac0bfcbb0be7781d84d7195d9e13a50ce0b9bd21f4064a698b |
|
MD5 | 15f108802c668de0476ac1665269c7df |
|
BLAKE2b-256 | dd5ac3330d2958845345198565cb8d27c29bf8a4eefcddd8a886696d46c26b31 |
File details
Details for the file pyseldonlib-1.0.0-cp39-cp39-musllinux_1_2_x86_64.whl
.
File metadata
- Download URL: pyseldonlib-1.0.0-cp39-cp39-musllinux_1_2_x86_64.whl
- Upload date:
- Size: 1.6 MB
- Tags: CPython 3.9, musllinux: musl 1.2+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.12.5
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 64adac235ee4346cc5026c21a91074eaffac0ed6ee7958c22e908c7adcc203b5 |
|
MD5 | ca4460aa0a8f5e24657ca1c895dad53e |
|
BLAKE2b-256 | eab81f8d80be20ddf9f4b5fffd6462f1c06f90044e5cc8a5d78256eb35139c4a |
File details
Details for the file pyseldonlib-1.0.0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
.
File metadata
- Download URL: pyseldonlib-1.0.0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
- Upload date:
- Size: 763.2 kB
- Tags: CPython 3.9, manylinux: glibc 2.17+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.12.5
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 575ff03e334ac4e8cd497940c9b82ffbb251805c03184afbd25ca852b4a6c730 |
|
MD5 | 33da8599c2aa9b5e158f3b625c1ce4da |
|
BLAKE2b-256 | 9c10c3270775c62fb5edeba90ed3ba791660fad83a5830feebe9ed028c42a5ae |
File details
Details for the file pyseldonlib-1.0.0-cp39-cp39-macosx_12_6_x86_64.whl
.
File metadata
- Download URL: pyseldonlib-1.0.0-cp39-cp39-macosx_12_6_x86_64.whl
- Upload date:
- Size: 522.9 kB
- Tags: CPython 3.9, macOS 12.6+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.12.5
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | c03c38ebb4604e9ba946095be7bac0acd95c6656d681a9eaaa0c899eb8c3b515 |
|
MD5 | 90a96c92f24b88e978b5e3a48fa50f42 |
|
BLAKE2b-256 | 85ebf2c8dc9814f56219061c7a7d3cb15e2c1b430f23414e094389d46c3f91ea |
File details
Details for the file pyseldonlib-1.0.0-cp39-cp39-macosx_12_6_arm64.whl
.
File metadata
- Download URL: pyseldonlib-1.0.0-cp39-cp39-macosx_12_6_arm64.whl
- Upload date:
- Size: 498.7 kB
- Tags: CPython 3.9, macOS 12.6+ ARM64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.12.5
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | a956ff2ccee205154344d7db2b308b38a0c9114397862dec472aefec4bd64094 |
|
MD5 | 8c90c1161e9c12cb4997ce5ea0a30502 |
|
BLAKE2b-256 | 4dd08655d240f1552e6a9ad8f3410a9998c77b3d5fa4df2eddf751dfc8f564cb |