
About BPAD Interactive
BPAD — Biomedical Physics with Applications to Disease — is a textbook project that connects the physics of measurement to the statistics of inference in clinical research. Its data-modeling chapter introduces the machine-learning workflow through a single running example: kidney tumour CT, segmentation masks, and the outcomes that follow surgery.
Chapter 7 adds bioelectric and biomagnetic diagnostic methods: EEG, MEG, ECG and EMG, with ten interactive laboratories. The former image-processing Chapter 7 becomes Chapter 8, and the former data-modeling Chapter 8 becomes Chapter 9.
The chapter's ideas were originally illustrated with R/Shiny applications. Shiny requires a running R server, which makes the demonstrations awkward to share, slow to load, and impossible to use offline. This site reimplements each of those applications as a browser-native module: the simulation, the model fitting and the plotting all run in your own tab, in TypeScript, with no backend of any kind. Nothing you enter is transmitted anywhere.
How the modules are organized
The catalog follows nine topic clusters. Data-modeling section numbers are preserved within Chapter 9; they are not separate textbook chapters.
Foundations & Study Design
Chapter 9 · Sections 1–3Estimands, dependence structure, acquisition shift, leakage, and the design decisions that determine whether a model result means anything at all.
Imaging Features & Preprocessing
Chapter 9 · Sections 4–6; Chapter 8 bridgeFrom CT volumes and masks to quantitative features: physical units, texture discretization, augmentation, and the physics of image formation.
Bioelectric & Biomagnetic Methods
Chapter 7 · Labs 7.1–7.15Electrogenesis, ECG, EEG, MEG, EMG, volume conduction, inverse estimation, uncertainty and EIT.
Supervised Learning
Chapter 9 · Section 7Classification and regression on the kidney cohort: thresholds, ROC geometry, neighborhood methods, model comparison, and decision cost.
Time-to-Event & Longitudinal
Chapter 9 · Section 8Censoring, competing risks, landmark analysis, tumor growth kinetics, and joint models for repeated biomarker measurements.
Unsupervised Learning & Segmentation
Chapter 9 · Section 9Phenotyping, cluster stability, intensity and spectral segmentation, and the metrics used to judge a delineation.
Deep Learning & Image-Native AI
Chapter 9 · Section 10Capacity and overfitting, convolution kernels as physical operators, receptive fields, parameter budgets, and multimodal fusion.
Evaluation, Calibration & Uncertainty
Chapter 9 · Section 11Discrimination versus calibration, decision curves, conformal prediction intervals, and reproducibility auditing.
Translation, Fairness & Deployment
Chapter 9 · Sections 12–13Subgroup fairness, counterfactual explanation, shortcut learning, differential privacy, human-AI teaming, and model documentation.
Textbook chapter insertion & cross-links
- Chapter 6: Nuclear Medicine & Emission Tomography
Unchanged
- Chapter 7: Bioelectric and Biomagnetic Diagnostic Methods — EEG, MEG, ECG, and EMG
New chapter
- Chapter 8: General Medical Image Processing, Quantitative Measurement and Uncertainty
Former Chapter 7
- Chapter 9: Data Modeling, Artificial Intelligence, and Biomedical Applications
Former Chapter 8
Actual later textbook chapters shift upward once; within-chapter sections and lab labels do not. Related-module bridges connect forward physics, signal processing, inverse methods, uncertainty and classification in both directions. These updates apply to this companion site; the external textbook and source notebooks are not rewritten here.
Chapter 7 scientific review
Model refinements, validation levels & sources
Scope retained
The ten approved topics are retained: electrogenesis; volume conduction; lead fields and reciprocity; ECG/VCG; QRS/HRV; EEG spectra/ERP; Sarvas EEG/MEG; EMG recruitment/fatigue; MNE inverse estimation; uncertainty/stimulation/EIT.
Corrections to the earlier proposal
- Existing cluster labels “Sections 1–13” denote sections of the former Chapter 8 data-modeling notebook, now Chapter 9. They are not Chapters 1–13. Preserve these sections; do not invent textbook Chapters 10–14 from cluster names. The insertion rule shifts actual old textbook chapters 7+ once.
- Three-shell conductor uses the notebook’s scaled Legendre boundary-matching solver for radial dipoles only. Tangential EEG comparisons explicitly use an infinite-medium model, not a falsely claimed tangential layered-sphere solution.
- Reciprocity uses the reciprocal electric field, not current density without the conductivity conversion. SI dipole moments are A·m.
- Synthetic ECG/VCG is a Gaussian geometric signal model. Chest projections are illustrative, not anatomical clinical 12-lead fields. Lead laws hold by construction and are not independent clinical validation.
- QRS detector is offline Pan–Tompkins-inspired, not an exact original causal implementation. It includes zero-phase FFT bandpass, derivative, squaring, causal moving integration, adaptive thresholding, and refractory enforcement after snapping. It omits original search-back/T-wave discrimination. Measured-data performance is reported separately.
- HRV is based on contiguous accepted NN intervals; do not join gaps across ectopic beats. Short recordings cannot estimate reliable LF/VLF or support LF/HF autonomic interpretation. Such frequency-HRV claims are intentionally excluded.
- Welch doubles interior bins only; DC and Nyquist are not doubled. Hann normalization preserves physical power density. EEG continuous signals are generated continuously, not concatenated trials. ERP trial averaging is a separate experiment.
- Sarvas radial silence is exact only under spherical symmetry. Plot radial magnetometer components separately from full-vector norm; do not infer source localization from map extrema.
- EMG uses motor-unit pulse superposition, positive discharge intervals, and fatigue-dependent temporal stretching. It is a teaching model, not a physical calibrated surface-electrode model. Spectral shifts do not diagnose fatigue independently of recruitment, temperature, or geometry.
- MNE uses a dimensionless scaled source basis (one unit = 10 nA·m), EEG in µV, and white equal-variance noise. Regularization units follow this scaling. L-curves show trade-offs, not a guaranteed optimal corner. Compare unscaled amplitudes and point-spread resolution columns.
- GUM distinguishes uncertainty of a mean (SD/√N) from single measurement SD; rectangular fiducial and sampling components assume declared independence. k=2 is approximate, not guaranteed 95% coverage. Fiducial definition is not a universally correct QT endpoint.
- EIT is upgraded from the notebook’s infinite-medium sensitivity picture to a connected circular discrete resistor network with fixed unit sheet conductance, 16 point electrodes, nonlinear forward solves, an adjoint node-conductivity Jacobian, and linearized Tikhonov reconstruction. This is not a 3D finite-element or complete-electrode clinical thorax model. Small-perturbation validity is checked against nonlinear data.
- Stimulation energy optimum applies only to the stipulated Lapicque–Weiss model at fixed resistance; virtual controls are not patient-device design instructions.
Validation levels
- Analytic: Nernst limits/signs, dipole scaling, equal-shell coefficients, Sarvas axial magnitude/radial zero, ECG identities, diagonal Tikhonov, GUM quadrature, chronaxie optimum.
- Numerical: sphere convergence, PSD power/endpoint normalization, synthetic peak matching, ERP averaging, EMG spectral stretching, EIT reciprocity and central-difference Jacobian.
- Measured: MIT-BIH 100 native 360 Hz MLII 30-second segment with original beat annotations; PTB patient001/s0010_re native 1 kHz eight-second 12-lead segment. Headers/calibration/full-record checksums are checked during conversion. A short excerpt is not clinical certification or full database validation.
Sources
- Author-supplied BPAD Chapter 7 Rmd, Labs 7.1–7.15, including 7.4b and 7.8R.
- Sarvas (1987), Basic mathematical and electromagnetic concepts of the biomagnetic inverse problem.
- Pan and Tompkins (1985), A real-time QRS detection algorithm.
- Welch (1967), The use of fast Fourier transform for the estimation of power spectra.
- MNE minimum-norm tutorial.
- JCGM 100:2008 GUM.
- MIT-BIH Arrhythmia Database 1.0.0 — Moody & Mark (2001), Goldberger et al. (2000), ODC-BY 1.0.
- PTB Diagnostic ECG Database 1.0.0 — Bousseljot et al. (1995), Goldberger et al. (2000), ODC-BY 1.0.
Delivery phases
- Review models and chapter provenance; document assumptions.
- Implement pure numerical routines and analytic regression tests.
- Implement ten interactive pages with quantitative teaching activities.
- Integrate chapter metadata and reciprocal conceptual bridges.
- Verify numerical tests, all tabs/math, controls, measured-record workflows, desktop/mobile, and sitemap discovery.
Verified results — 6 November 2026
- 23 regression tests pass, including signed EEG reciprocity, all 49 EIT Jacobian columns against central finite differences on the actual displayed grid, 16 distinct boundary electrodes, and zero-net same-node injection.
- MIT-BIH 100 first 30 s: 37 true positives, 0 false positives, 0 false negatives, with one-to-one ±100 ms matching. This is one short reference segment, not full-database detector validation.
- All ten pages render; each Background and Teaching notes tab has correctly rendered mathematical notation without KaTeX errors. One parameter change and JSON result readback was exercised in every app.
- Native PTB measured 12-lead mode and annotated MIT-BIH mode were exercised through the UI. Related-module navigation works in both directions by shared metadata.
- The EIT centered inclusion with +0.05 conductivity fraction and no noise has 1.859% nonlinear-versus-linear discrepancy; this is measured model approximation error, not a reconstruction accuracy guarantee.
- Desktop 1280-pixel and mobile 390-pixel checks show no page overflow; final browser runs report no runtime or hydration errors.
- The sitemap contains 56 public URLs, including all ten Chapter 7 modules. Existing public module URLs and data-modeling section numbers are preserved.
Deliberate scope limits
The refined suite does not claim anatomical 3D clinical VCG, tangential layered-head solutions, a faithful original causal Pan–Tompkins detector, long-record frequency HRV, measured 10–20 interpolation or sleep scoring, clinical QT fiducial automation, or complete-electrode anatomical EIT. These are explicit model boundaries, not hidden substitutes. External textbook and uploaded Rmd chapter references remain outside this site's update scope.
How the simulations work
- Reproducibility. Every module uses a seeded pseudo-random generator. The same seed and the same control settings always produce the same numbers, so a figure can be recreated exactly in a lecture, a lab report or an exam.
- Real algorithms. Logistic and linear models are fit by iteratively reweighted least squares and QR-free normal equations; Kaplan–Meier curves, log-rank tests, ROC and precision–recall curves, k-means, hierarchical clustering, PCA, GLCM texture features and Otsu thresholding are all implemented directly rather than approximated.
- Synthetic but faithful data. The cohorts are simulated with generative mechanisms that mirror the published KiTS-style kidney tumour data: skewed volumes, correlated radiomic features, informative censoring and protocol-dependent measurement error. No patient data is distributed with this site.
- Accessibility. Figures are SVG with text labels, controls are keyboard operable, and the colour palette is checked for contrast in both light and dark themes.
Credits and reuse
Authors
Dr. Magdalena I. Ivanova, University of Michigan
Dr. Ivo D. Dinov, University of Michigan
Built with support from Statistics Online Computational Resource (SOCR) at the University of Michigan. The material is intended for teaching and self-study; you are welcome to use the modules in courses with attribution to the BPAD textbook and SOCR.