Skip to content

Pedagogy: add SIR parameter sliders (β, γ) to Spread_of_disease notebook #376

@kwlee2025cpp

Description

@kwlee2025cpp

Add ipywidgets sliders for the SIR-model parameters β (transmission rate) and γ (recovery rate) — and optionally the initial infected fraction — to 50_ode/55_Spread_of_disease.ipynb. Re-integrate with scipy.integrate.solve_ivp on slider change and redraw the S/I/R curves.

Scope

  • Sliders: β (e.g., 0–1), γ (e.g., 0–1), optionally I₀ / N.
  • Plot: stacked or overlaid S(t), I(t), R(t) on the same axes.
  • Optional callout: basic reproduction number R₀ = β/γ shown alongside, so the learner can directly link the parameter ratio to the wave shape.

Why

SIR is a textbook 'parameter sensitivity' model — the entire teaching value is watching how the epidemic curve flattens, peaks, or never takes off as β/γ varies. Sliders are exactly the right interface for that intuition. Same validated pattern (iterative/parameter-driven model + ipywidgets) as #353 / #354.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions