reproducibility-with-randomness
This tutorial covers various topics on reproducibility in Python programs incorporating randomness, primarily focusing on NumPy.
Science Score: 44.0%
This score indicates how likely this project is to be science-related based on various indicators:
-
✓CITATION.cff file
Found CITATION.cff file -
✓codemeta.json file
Found codemeta.json file -
✓.zenodo.json file
Found .zenodo.json file -
○DOI references
-
○Academic publication links
-
○Academic email domains
-
○Institutional organization owner
-
○JOSS paper metadata
-
○Scientific vocabulary similarity
Low similarity (8.0%) to scientific vocabulary
Repository
This tutorial covers various topics on reproducibility in Python programs incorporating randomness, primarily focusing on NumPy.
Basic Info
Statistics
- Stars: 2
- Watchers: 2
- Forks: 0
- Open Issues: 0
- Releases: 0
Metadata Files
README.md
Tutorial on reproducibility with randomness
This tutorial will cover the following topics on reproducibility in Python programs incorporating randomness, primarily focusing on NumPy.
Learning goals
- Random states in NumPy
- Preserving the random state
- Avoid cherry-picking results
Target audience
This tutorial is aimed at social scientists and data scientists who are interested in making their Python code with randomness reproducible. The tutorial is suitable for beginners and intermediate learners with some knowledge in Python.
Social science use cases
Reproducibility with randomness is an important concept in social science studies, particularly when performing sampling, simulations, or machine learning. Here are some examples:
- Sampling from surveys
- Simulations with agent-based models (ABM) or Monte Carlo methods
- Network analysis with random graphs
- Machine learning
Estimated duration
The tutorial is designed to be completed in 1-2 hours. The duration may vary depending on the prior knowledge of the participants.
Setting up the computational environment
Hardware
The tutorial can be run on a laptop or desktop computer.
Software
To run the code in the tutorial on mybinder.org, simply click the "launch|binder" badge.
To run it locally, Python >= 3.9 is required. In addition, the necessary packages are listed in requirements.txt. Using pip as an example, install the packages with
sh
pip install -r requirements.txt
Author
Dr. Jun Sun @ GESIS
Owner
- Name: 孙骏
- Login: yfiua
- Kind: user
- Company: @gesiscss
- Repositories: 1
- Profile: https://github.com/yfiua
Machine Learning; Network Science; Vim
Citation (CITATION.cff)
# This CITATION.cff file was generated with cffinit.
# Visit https://bit.ly/cffinit to generate yours today!
cff-version: 1.2.0
title: Tutorial on reproducibility with randomness
message: >-
If you use this software, please cite it using the
metadata from this file.
type: software
authors:
- given-names: Jun
family-names: Sun
affiliation: GESIS - Leibniz Institute for the Social Sciences
email: jun.sun@gesis.org
orcid: 'https://orcid.org/0000-0002-4789-7316'
repository-code: 'https://github.com/yfiua/reproducibility-with-randomness'
license: Apache-2.0
commit: d8ecb22
date-released: '2025-07-11'
GitHub Events
Total
- Issues event: 5
- Watch event: 1
- Push event: 5
Last Year
- Issues event: 5
- Watch event: 1
- Push event: 5
Issues and Pull Requests
Last synced: 6 months ago
All Time
- Total issues: 3
- Total pull requests: 0
- Average time to close issues: 5 days
- Average time to close pull requests: N/A
- Total issue authors: 2
- Total pull request authors: 0
- Average comments per issue: 0.0
- Average comments per pull request: 0
- Merged pull requests: 0
- Bot issues: 0
- Bot pull requests: 0
Past Year
- Issues: 3
- Pull requests: 0
- Average time to close issues: 5 days
- Average time to close pull requests: N/A
- Issue authors: 2
- Pull request authors: 0
- Average comments per issue: 0.0
- Average comments per pull request: 0
- Merged pull requests: 0
- Bot issues: 0
- Bot pull requests: 0
Top Authors
Issue Authors
- cviehmann (2)
- rgaiacs (1)