reproducibility-with-randomness

This tutorial covers various topics on reproducibility in Python programs incorporating randomness, primarily focusing on NumPy.

https://github.com/yfiua/reproducibility-with-randomness

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
Last synced: 6 months ago · JSON representation ·

Repository

This tutorial covers various topics on reproducibility in Python programs incorporating randomness, primarily focusing on NumPy.

Basic Info
  • Host: GitHub
  • Owner: yfiua
  • License: apache-2.0
  • Language: Jupyter Notebook
  • Default Branch: main
  • Homepage:
  • Size: 440 KB
Statistics
  • Stars: 2
  • Watchers: 2
  • Forks: 0
  • Open Issues: 0
  • Releases: 0
Created almost 2 years ago · Last pushed 8 months ago
Metadata Files
Readme License Citation

README.md

Binder

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

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)
Pull Request Authors
Top Labels
Issue Labels
Pull Request Labels