WHY MATHEMATICS?
Why Mathematics? | cell2location for Spatial Cell Maps: Negative Binomial Regression, Hierarchical Priors, Cell Abundance and Technology Factors
How cell2location turns a spatial count matrix and single-cell reference signatures into probabilistic maps of cell abundance while accounting for overdispersion, technology sensitivity, detection efficiency and background RNA.
Why mathematics is important becomes easier to see when a real decision depends on it. This guide follows the mechanism from definitions and dimensions to a worked calculation, validation, practical learning and responsible use. It keeps factual evidence separate from interpretation and treats every illustrative scenario as an example rather than a promise of results.
Choose a reading route
- Build cell-type reference signatures with negative binomial regression
- Express every spatial count as abundance, technology and background terms
- Use hierarchical priors to stabilize related locations and cell types
- Test posterior abundance against histology, holdouts and prior sensitivity
Chapter map
- 1. Reference count matrix
- 2. Negative binomial signature regression
- 3. Spatial count likelihood
- 4. Cell-type contribution sum
- 5. Gene technology sensitivity
- 6. Location detection sensitivity
- 7. Additive background
- 8. Absolute abundance prior
- 9. Co-located cell-type groups
- 10. Gamma hierarchy
- 11. Variational posterior
- 12. Posterior quantiles
- 13. Worked two-type location
- 14. Posterior predictive check
- 15. Rare-type validation
- 16. Governance and learning
Visit the How Mathematics Works hub for the wider series and its connections to education, reasoning, science, computing, design and careers.
1. Reference count matrix
This step deserves a careful pause. Annotated scRNA or snRNA counts supply cells, genes, batches and cell-type labels.
A concrete situation
Three donors provide 20,000 cells and 4,000 shared genes.
What the mathematics does not license
Unbalanced or mislabeled references distort signatures. A trustworthy workflow records the choice before seeing the final test result.
Try it, check it, transfer it
Audit labels and donor coverage. Then explain the result to someone who has not seen the formula. If the explanation needs a hidden assumption, add that assumption to the model record.
2. Negative binomial signature regression
The useful question is not only how to calculate, but what the calculation assumes. Cell-type mean expression signatures are estimated with an overdispersed count regression that can include batches and technologies.
A concrete situation
A macrophage signature estimates average transcripts for every gene.
What the mathematics does not license
A mean signature hides within-type states. Evidence becomes stronger when the limitation is tested instead of hidden.
Try it, check it, transfer it
Compare donors and states. Then explain the result to someone who has not seen the formula. If the explanation needs a hidden assumption, add that assumption to the model record.
3. Spatial count likelihood
A small example makes the mechanism visible. For location s and gene g, D_sg follows a negative binomial with mean mu_sg and gene- or batch-specific overdispersion.
A concrete situation
A mean of 18 counts can generate 8, 18 or 35.
What the mathematics does not license
Dispersion can absorb misspecification. Keeping this boundary clear makes the result easier to audit and transfer.
Try it, check it, transfer it
Inspect count residuals. Then explain the result to someone who has not seen the formula. If the explanation needs a hidden assumption, add that assumption to the model record.
4. Cell-type contribution sum
This is where modelling choices begin to affect evidence. The biological part of mu_sg sums abundance w_sf times reference signature g_fg across cell types f.
A concrete situation
Two cell types contribute 12 and 5 expected transcripts.
What the mathematics does not license
Similar signatures are hard to separate. A trustworthy workflow records the choice before seeing the final test result.
Try it, check it, transfer it
Challenge close subtypes. Then explain the result to someone who has not seen the formula. If the explanation needs a hidden assumption, add that assumption to the model record.
Did You Know? In this chapter, the most important number is useful only together with its construction rule. Changing scaling, sample membership or validation design can change the numerical answer without changing the arithmetic.
5. Gene technology sensitivity
The central mathematical idea is concrete. A multiplicative m_g term adjusts systematic gene detection between reference and spatial technologies.
A concrete situation
Gene A is detected at half the relative rate in Visium.
What the mathematics does not license
m_g and abundance can be non-identifiable. Evidence becomes stronger when the limitation is tested instead of hidden.
Try it, check it, transfer it
Use informative priors and sections. Then explain the result to someone who has not seen the formula. If the explanation needs a hidden assumption, add that assumption to the model record.
6. Location detection sensitivity
Here the geometry becomes operational. A positive y_s factor accounts for spot-to-spot capture efficiency within a batch.
A concrete situation
One location detects 70% of the batch-average RNA.
What the mathematics does not license
Over-normalisation can erase biology. Keeping this boundary clear makes the result easier to audit and transfer.
Try it, check it, transfer it
Inspect sensitivity against tissue. Then explain the result to someone who has not seen the formula. If the explanation needs a hidden assumption, add that assumption to the model record.
7. Additive background
This step deserves a careful pause. Gene- and experiment-specific terms represent contaminating or free-floating RNA that is not assigned to local cells.
A concrete situation
Ambient immunoglobulin transcripts appear across a slide.
What the mathematics does not license
Background can overlap true diffuse expression. A trustworthy workflow records the choice before seeing the final test result.
Try it, check it, transfer it
Use empty-space and histology evidence. Then explain the result to someone who has not seen the formula. If the explanation needs a hidden assumption, add that assumption to the model record.
8. Absolute abundance prior
The useful question is not only how to calculate, but what the calculation assumes. A prior centred on expected cells per location anchors the scale of w.
A concrete situation
Nuclei counts suggest eight cells per Visium spot.
What the mathematics does not license
A wrong prior shifts absolute abundance. Evidence becomes stronger when the limitation is tested instead of hidden.
Try it, check it, transfer it
Run a prior sensitivity grid. Then explain the result to someone who has not seen the formula. If the explanation needs a hidden assumption, add that assumption to the model record.
Did You Know? In this chapter, the most important number is useful only together with its construction rule. Changing scaling, sample membership or validation design can change the numerical answer without changing the arithmetic.
9. Co-located cell-type groups
A small example makes the mechanism visible. A factorization expresses abundance patterns through latent groups or tissue zones to share information across types and locations.
A concrete situation
Neuron and astrocyte subtypes co-vary across a region.
What the mathematics does not license
The grouping is a statistical pattern. Keeping this boundary clear makes the result easier to audit and transfer.
Try it, check it, transfer it
Compare with anatomy. Then explain the result to someone who has not seen the formula. If the explanation needs a hidden assumption, add that assumption to the model record.
10. Gamma hierarchy
This is where modelling choices begin to affect evidence. Positive parameters and their hyperparameters receive Gamma-family priors chosen to encode expected means and variability.
A concrete situation
A detection factor stays near one unless data disagree.
What the mathematics does not license
Hyperpriors still influence sparse estimates. A trustworthy workflow records the choice before seeing the final test result.
Try it, check it, transfer it
Report posterior-prior movement. Then explain the result to someone who has not seen the formula. If the explanation needs a hidden assumption, add that assumption to the model record.
11. Variational posterior
The central mathematical idea is concrete. Approximate variational inference replaces the intractable joint posterior with a trainable distribution.
A concrete situation
Each abundance receives a mean and credible quantiles.
What the mathematics does not license
Mean-field approximations can understate dependence. Evidence becomes stronger when the limitation is tested instead of hidden.
Try it, check it, transfer it
Use simulation calibration. Then explain the result to someone who has not seen the formula. If the explanation needs a hidden assumption, add that assumption to the model record.
12. Posterior quantiles
Here the geometry becomes operational. Lower and upper posterior summaries distinguish stable abundance from uncertain allocation.
A concrete situation
The 5th percentile remains above zero for one subtype.
What the mathematics does not license
A threshold is a decision rule. Keeping this boundary clear makes the result easier to audit and transfer.
Try it, check it, transfer it
Publish multiple quantiles. Then explain the result to someone who has not seen the formula. If the explanation needs a hidden assumption, add that assumption to the model record.
Did You Know? In this chapter, the most important number is useful only together with its construction rule. Changing scaling, sample membership or validation design can change the numerical answer without changing the arithmetic.
13. Worked two-type location
This step deserves a careful pause. Multiply two reference signatures by abundances, add background, apply gene and location sensitivity, then obtain mu.
A concrete situation
Three and five expected cells generate one count mean vector.
What the mathematics does not license
Toy terms are assumed known. A trustworthy workflow records the choice before seeing the final test result.
Try it, check it, transfer it
Vary every factor. Then explain the result to someone who has not seen the formula. If the explanation needs a hidden assumption, add that assumption to the model record.
14. Posterior predictive check
The useful question is not only how to calculate, but what the calculation assumes. Simulated counts from fitted parameters should reproduce abundance bands, zeros, tails and spatial residual patterns.
A concrete situation
Observed high-count tails exceed model simulations.
What the mathematics does not license
A global fit can hide local failure. Evidence becomes stronger when the limitation is tested instead of hidden.
Try it, check it, transfer it
Map residuals by tissue region. Then explain the result to someone who has not seen the formula. If the explanation needs a hidden assumption, add that assumption to the model record.
15. Rare-type validation
A small example makes the mechanism visible. Hold out or spike a rare reference type and measure false allocation into similar common types.
A concrete situation
Pre-germinal-centre B cells compete with related B states.
What the mathematics does not license
Markers may not be unique. Keeping this boundary clear makes the result easier to audit and transfer.
Try it, check it, transfer it
Use orthogonal staining. Then explain the result to someone who has not seen the formula. If the explanation needs a hidden assumption, add that assumption to the model record.
16. Governance and learning
This is where modelling choices begin to affect evidence. Version counts, signatures, priors, technologies, inference and posterior rules. This joins algebra, probability and tissue biology.
A concrete situation
Students can start with weighted sums and Gamma priors.
What the mathematics does not license
Posterior abundance is conditional evidence. A trustworthy workflow records the choice before seeing the final test result.
Try it, check it, transfer it
Write a cell-map evidence card. Then explain the result to someone who has not seen the formula. If the explanation needs a hidden assumption, add that assumption to the model record.
Did You Know? In this chapter, the most important number is useful only together with its construction rule. Changing scaling, sample membership or validation design can change the numerical answer without changing the arithmetic.
A seven-day practice lab
- Day 1: define the decision, observation unit, X variables and Y or reference condition.
- Day 2: reproduce the smallest worked example and check every dimension, unit and sign.
- Day 3: build a transparent baseline and write what it assumes.
- Day 4: fit the main method inside a training-only pipeline; record every parameter.
- Day 5: challenge one assumption with a deliberately difficult dataset or operating regime.
- Day 6: compare validation metrics with the practical workload created by errors.
- Day 7: present one supported conclusion, one unresolved uncertainty and one safe next experiment.
Questions for a student, parent or mentor
- Which part of the model is a mathematical definition, and which part is a choice?
- What small calculation would catch a sign, scale or dimension error?
- What evidence comes from training, validation and the untouched test?
- What benign condition could look like a fault or prediction failure?
- How would the answer change for another response, asset, school project or time period?
- What should a human review before acting on the score?
A method-specific audit before deployment
A cell2location audit starts with raw spatial counts and reference expression signatures for declared cell types. The expected count for a gene at a location is assembled from nonnegative cell-type abundances, reference signatures, gene-specific technology sensitivity, location detection sensitivity and additive background. A negative binomial observation model represents overdispersed counts, while hierarchical priors share information across genes, locations, experiments and co-located cell-type groups.
Record the single-cell reference, label hierarchy, gene intersection, spatial technology, tissue sections, expected cells per location, detection-sensitivity prior, reference-signature model, background terms, negative binomial dispersion, abundance priors, variational inference settings and posterior quantiles. Absolute abundance is informed by a tissue-level prior, so a histology-derived cells-per-location estimate is evidence, not a cosmetic setting.
Validate with synthetic mixtures, held-out tissue sections, histology or imaging counts, reference-donor swaps, absent-cell-type challenges, posterior predictive checks and sensitivity to the cell-number and detection priors. A posterior abundance is a model-based estimate under reference and prior assumptions; it is not a segmented cell or direct microscopic count.
Frequently asked questions
What is cell2location?
cell2location is a hierarchical Bayesian model that uses reference cell-type expression signatures to estimate the abundance of fine-grained cell types at spatial transcriptomics locations while modelling technical effects and count uncertainty.
Why use a negative binomial distribution?
Spatial transcript counts are discrete and commonly more variable than a Poisson distribution permits. The negative binomial adds a dispersion term so variance can exceed the mean.
What does w mean?
The nonnegative weight w for a location and reference signature is interpreted as expected cell abundance under the model. It depends on the reference, priors and detection model.
Why are hierarchical priors useful?
They share statistical strength across related parameters, encourage stable estimates in sparse data and express prior knowledge about cells per location, co-located groups and technology sensitivity.
What are technology factors?
Gene-specific and location- or batch-specific sensitivity terms account for systematic detection differences between the single-cell reference and the spatial assay.
Does cell2location count individual cells?
No. It estimates posterior abundance from mixed RNA counts. Histology or segmentation can inform and validate the prior, but the output is not direct observation of every cell.
Primary source and fact-check note
Vitalii Kleshchevnikov, Artem Shmatko, Emma Dann et al., “Cell2location maps fine-grained cell types in spatial transcriptomics,” Nature Biotechnology 40, 661–671 (2022), DOI 10.1038/s41587-021-01139-4. Definitions and core claims in this article were checked against this primary publication. Calculations shown here were independently recomputed. Examples are educational illustrations; they are not reported industrial performance results.
Useful next reading
Keep the options open. Mathematics education supports clearer questions, transferable problem-solving skills and informed choices across science, engineering, computing, AI, statistics, design and many other careers. It does not guarantee intelligence, income, admission or employment; those outcomes depend on far more than one subject or model.
Extended laboratory: topic-specific validation and responsible use
Reference audit
Check donors, labels, batches, technologies and missing states before estimating signatures.
Prior audit
State cells per location, cell types per location, co-located groups and detection-sensitivity assumptions.
Factor audit
Inspect abundance, gene sensitivity, spot sensitivity, background and dispersion separately.
Posterior check
Compare simulated and observed zeros, tails, totals and regional residuals.
Did You Know? A sophisticated adjustment can be algebraically correct and still answer the wrong scientific question when samples, labels, batches or validation boundaries are wrong.
Histology check
Compare abundance with nuclei counts, staining or segmentation where available.
Novelty challenge
Remove rare or similar cell types and measure false allocation.
Section holdout
Reserve complete sections, experiments or donors from all tuning.
Final claim
Name reference, priors and count law. Abundance is posterior inference, not direct cell counting.
Did You Know? A sophisticated adjustment can be algebraically correct and still answer the wrong scientific question when samples, labels, batches or validation boundaries are wrong.
Mechanism workshop: calculate, challenge and transfer
Workshop 1: Reference count matrix
Begin with this mechanism: Annotated scRNA or snRNA counts supply cells, genes, batches and cell-type labels. Work through the concrete case: Three donors provide 20,000 cells and 4,000 shared genes. Make the limitation visible: Unbalanced or mislabeled references distort signatures. Complete the evidence step: Audit labels and donor coverage. Write the matrices, count distribution, mixture, prior, loss function or mapping rule with named dimensions and units. Calculate one small example by hand, then change one assumption and explain which output moves and why. Use complete donors, tissue sections, spatial locations or gene panels outside tuning when testing transfer, because random rows from one specimen are not independent biological evidence. Keep observation, fitted parameter, prediction, interpretation and decision on separate notebook lines so a student, parent or reviewer can see exactly what the mathematics establishes.
Workshop 2: Negative binomial signature regression
Begin with this mechanism: Cell-type mean expression signatures are estimated with an overdispersed count regression that can include batches and technologies. Work through the concrete case: A macrophage signature estimates average transcripts for every gene. Make the limitation visible: A mean signature hides within-type states. Complete the evidence step: Compare donors and states. Write the matrices, count distribution, mixture, prior, loss function or mapping rule with named dimensions and units. Calculate one small example by hand, then change one assumption and explain which output moves and why. Use complete donors, tissue sections, spatial locations or gene panels outside tuning when testing transfer, because random rows from one specimen are not independent biological evidence. Keep observation, fitted parameter, prediction, interpretation and decision on separate notebook lines so a student, parent or reviewer can see exactly what the mathematics establishes.
Workshop 3: Spatial count likelihood
Begin with this mechanism: For location s and gene g, D_sg follows a negative binomial with mean mu_sg and gene- or batch-specific overdispersion. Work through the concrete case: A mean of 18 counts can generate 8, 18 or 35. Make the limitation visible: Dispersion can absorb misspecification. Complete the evidence step: Inspect count residuals. Write the matrices, count distribution, mixture, prior, loss function or mapping rule with named dimensions and units. Calculate one small example by hand, then change one assumption and explain which output moves and why. Use complete donors, tissue sections, spatial locations or gene panels outside tuning when testing transfer, because random rows from one specimen are not independent biological evidence. Keep observation, fitted parameter, prediction, interpretation and decision on separate notebook lines so a student, parent or reviewer can see exactly what the mathematics establishes.
Workshop 4: Cell-type contribution sum
Begin with this mechanism: The biological part of mu_sg sums abundance w_sf times reference signature g_fg across cell types f. Work through the concrete case: Two cell types contribute 12 and 5 expected transcripts. Make the limitation visible: Similar signatures are hard to separate. Complete the evidence step: Challenge close subtypes. Write the matrices, count distribution, mixture, prior, loss function or mapping rule with named dimensions and units. Calculate one small example by hand, then change one assumption and explain which output moves and why. Use complete donors, tissue sections, spatial locations or gene panels outside tuning when testing transfer, because random rows from one specimen are not independent biological evidence. Keep observation, fitted parameter, prediction, interpretation and decision on separate notebook lines so a student, parent or reviewer can see exactly what the mathematics establishes.
Did You Know? A sophisticated adjustment can be algebraically correct and still answer the wrong scientific question when samples, labels, batches or validation boundaries are wrong.
Workshop 5: Gene technology sensitivity
Begin with this mechanism: A multiplicative m_g term adjusts systematic gene detection between reference and spatial technologies. Work through the concrete case: Gene A is detected at half the relative rate in Visium. Make the limitation visible: m_g and abundance can be non-identifiable. Complete the evidence step: Use informative priors and sections. Write the matrices, count distribution, mixture, prior, loss function or mapping rule with named dimensions and units. Calculate one small example by hand, then change one assumption and explain which output moves and why. Use complete donors, tissue sections, spatial locations or gene panels outside tuning when testing transfer, because random rows from one specimen are not independent biological evidence. Keep observation, fitted parameter, prediction, interpretation and decision on separate notebook lines so a student, parent or reviewer can see exactly what the mathematics establishes.
Workshop 6: Location detection sensitivity
Begin with this mechanism: A positive y_s factor accounts for spot-to-spot capture efficiency within a batch. Work through the concrete case: One location detects 70% of the batch-average RNA. Make the limitation visible: Over-normalisation can erase biology. Complete the evidence step: Inspect sensitivity against tissue. Write the matrices, count distribution, mixture, prior, loss function or mapping rule with named dimensions and units. Calculate one small example by hand, then change one assumption and explain which output moves and why. Use complete donors, tissue sections, spatial locations or gene panels outside tuning when testing transfer, because random rows from one specimen are not independent biological evidence. Keep observation, fitted parameter, prediction, interpretation and decision on separate notebook lines so a student, parent or reviewer can see exactly what the mathematics establishes.
Workshop 7: Additive background
Begin with this mechanism: Gene- and experiment-specific terms represent contaminating or free-floating RNA that is not assigned to local cells. Work through the concrete case: Ambient immunoglobulin transcripts appear across a slide. Make the limitation visible: Background can overlap true diffuse expression. Complete the evidence step: Use empty-space and histology evidence. Write the matrices, count distribution, mixture, prior, loss function or mapping rule with named dimensions and units. Calculate one small example by hand, then change one assumption and explain which output moves and why. Use complete donors, tissue sections, spatial locations or gene panels outside tuning when testing transfer, because random rows from one specimen are not independent biological evidence. Keep observation, fitted parameter, prediction, interpretation and decision on separate notebook lines so a student, parent or reviewer can see exactly what the mathematics establishes.
Workshop 8: Absolute abundance prior
Begin with this mechanism: A prior centred on expected cells per location anchors the scale of w. Work through the concrete case: Nuclei counts suggest eight cells per Visium spot. Make the limitation visible: A wrong prior shifts absolute abundance. Complete the evidence step: Run a prior sensitivity grid. Write the matrices, count distribution, mixture, prior, loss function or mapping rule with named dimensions and units. Calculate one small example by hand, then change one assumption and explain which output moves and why. Use complete donors, tissue sections, spatial locations or gene panels outside tuning when testing transfer, because random rows from one specimen are not independent biological evidence. Keep observation, fitted parameter, prediction, interpretation and decision on separate notebook lines so a student, parent or reviewer can see exactly what the mathematics establishes.
Did You Know? A sophisticated adjustment can be algebraically correct and still answer the wrong scientific question when samples, labels, batches or validation boundaries are wrong.
Workshop 9: Co-located cell-type groups
Begin with this mechanism: A factorization expresses abundance patterns through latent groups or tissue zones to share information across types and locations. Work through the concrete case: Neuron and astrocyte subtypes co-vary across a region. Make the limitation visible: The grouping is a statistical pattern. Complete the evidence step: Compare with anatomy. Write the matrices, count distribution, mixture, prior, loss function or mapping rule with named dimensions and units. Calculate one small example by hand, then change one assumption and explain which output moves and why. Use complete donors, tissue sections, spatial locations or gene panels outside tuning when testing transfer, because random rows from one specimen are not independent biological evidence. Keep observation, fitted parameter, prediction, interpretation and decision on separate notebook lines so a student, parent or reviewer can see exactly what the mathematics establishes.
Workshop 10: Gamma hierarchy
Begin with this mechanism: Positive parameters and their hyperparameters receive Gamma-family priors chosen to encode expected means and variability. Work through the concrete case: A detection factor stays near one unless data disagree. Make the limitation visible: Hyperpriors still influence sparse estimates. Complete the evidence step: Report posterior-prior movement. Write the matrices, count distribution, mixture, prior, loss function or mapping rule with named dimensions and units. Calculate one small example by hand, then change one assumption and explain which output moves and why. Use complete donors, tissue sections, spatial locations or gene panels outside tuning when testing transfer, because random rows from one specimen are not independent biological evidence. Keep observation, fitted parameter, prediction, interpretation and decision on separate notebook lines so a student, parent or reviewer can see exactly what the mathematics establishes.
Workshop 11: Variational posterior
Begin with this mechanism: Approximate variational inference replaces the intractable joint posterior with a trainable distribution. Work through the concrete case: Each abundance receives a mean and credible quantiles. Make the limitation visible: Mean-field approximations can understate dependence. Complete the evidence step: Use simulation calibration. Write the matrices, count distribution, mixture, prior, loss function or mapping rule with named dimensions and units. Calculate one small example by hand, then change one assumption and explain which output moves and why. Use complete donors, tissue sections, spatial locations or gene panels outside tuning when testing transfer, because random rows from one specimen are not independent biological evidence. Keep observation, fitted parameter, prediction, interpretation and decision on separate notebook lines so a student, parent or reviewer can see exactly what the mathematics establishes.
Workshop 12: Posterior quantiles
Begin with this mechanism: Lower and upper posterior summaries distinguish stable abundance from uncertain allocation. Work through the concrete case: The 5th percentile remains above zero for one subtype. Make the limitation visible: A threshold is a decision rule. Complete the evidence step: Publish multiple quantiles. Write the matrices, count distribution, mixture, prior, loss function or mapping rule with named dimensions and units. Calculate one small example by hand, then change one assumption and explain which output moves and why. Use complete donors, tissue sections, spatial locations or gene panels outside tuning when testing transfer, because random rows from one specimen are not independent biological evidence. Keep observation, fitted parameter, prediction, interpretation and decision on separate notebook lines so a student, parent or reviewer can see exactly what the mathematics establishes.
Did You Know? A sophisticated adjustment can be algebraically correct and still answer the wrong scientific question when samples, labels, batches or validation boundaries are wrong.
Workshop 13: Worked two-type location
Begin with this mechanism: Multiply two reference signatures by abundances, add background, apply gene and location sensitivity, then obtain mu. Work through the concrete case: Three and five expected cells generate one count mean vector. Make the limitation visible: Toy terms are assumed known. Complete the evidence step: Vary every factor. Write the matrices, count distribution, mixture, prior, loss function or mapping rule with named dimensions and units. Calculate one small example by hand, then change one assumption and explain which output moves and why. Use complete donors, tissue sections, spatial locations or gene panels outside tuning when testing transfer, because random rows from one specimen are not independent biological evidence. Keep observation, fitted parameter, prediction, interpretation and decision on separate notebook lines so a student, parent or reviewer can see exactly what the mathematics establishes.
Workshop 14: Posterior predictive check
Begin with this mechanism: Simulated counts from fitted parameters should reproduce abundance bands, zeros, tails and spatial residual patterns. Work through the concrete case: Observed high-count tails exceed model simulations. Make the limitation visible: A global fit can hide local failure. Complete the evidence step: Map residuals by tissue region. Write the matrices, count distribution, mixture, prior, loss function or mapping rule with named dimensions and units. Calculate one small example by hand, then change one assumption and explain which output moves and why. Use complete donors, tissue sections, spatial locations or gene panels outside tuning when testing transfer, because random rows from one specimen are not independent biological evidence. Keep observation, fitted parameter, prediction, interpretation and decision on separate notebook lines so a student, parent or reviewer can see exactly what the mathematics establishes.
Workshop 15: Rare-type validation
Begin with this mechanism: Hold out or spike a rare reference type and measure false allocation into similar common types. Work through the concrete case: Pre-germinal-centre B cells compete with related B states. Make the limitation visible: Markers may not be unique. Complete the evidence step: Use orthogonal staining. Write the matrices, count distribution, mixture, prior, loss function or mapping rule with named dimensions and units. Calculate one small example by hand, then change one assumption and explain which output moves and why. Use complete donors, tissue sections, spatial locations or gene panels outside tuning when testing transfer, because random rows from one specimen are not independent biological evidence. Keep observation, fitted parameter, prediction, interpretation and decision on separate notebook lines so a student, parent or reviewer can see exactly what the mathematics establishes.
Workshop 16: Governance and learning
Begin with this mechanism: Version counts, signatures, priors, technologies, inference and posterior rules. This joins algebra, probability and tissue biology. Work through the concrete case: Students can start with weighted sums and Gamma priors. Make the limitation visible: Posterior abundance is conditional evidence. Complete the evidence step: Write a cell-map evidence card. Write the matrices, count distribution, mixture, prior, loss function or mapping rule with named dimensions and units. Calculate one small example by hand, then change one assumption and explain which output moves and why. Use complete donors, tissue sections, spatial locations or gene panels outside tuning when testing transfer, because random rows from one specimen are not independent biological evidence. Keep observation, fitted parameter, prediction, interpretation and decision on separate notebook lines so a student, parent or reviewer can see exactly what the mathematics establishes.