VIEW THIS AS

Auto mode follows the Route Engine until you choose a viewpoint.

YOU ARE HERE

ROUTE CHECK

CONNECTED TO

WHAT NEXT

Use the canonical route for this room, or HELP if you are unsure.

Why Mathematics? | Garnett for Interpretable Cell Classification: Marker Rules, Elastic-Net Models, Hierarchical Labels and Unknown Cells

WHY MATHEMATICS?

Why Mathematics? | Garnett for Interpretable Cell Classification: Marker Rules, Elastic-Net Models, Hierarchical Labels and Unknown Cells

How Garnett turns an expert-written marker hierarchy into representative training cells and sparse classifiers that can be inspected, transferred and allowed to return unknown.

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

  • Write positive and negative marker rules in a hierarchy
  • Select unambiguous representative cells
  • Train sparse multinomial classifiers at each node
  • Classify new cells, preserve unknowns and audit cluster extension

Chapter map

  1. 1. Why markers can supervise a classifier
  2. 2. The marker markup language
  3. 3. Positive markers
  4. 4. Negative markers
  5. 5. Ambiguity checks
  6. 6. Representative cells
  7. 7. Hierarchical training
  8. 8. Multinomial logistic regression
  9. 9. Elastic-net penalty
  10. 10. Selected feature genes
  11. 11. Cluster-agnostic classification
  12. 12. Cluster-extended labels
  13. 13. Unknown cells
  14. 14. Cross-platform and species transfer
  15. 15. A student sparse-classifier project
  16. 16. Governance and careers

Visit the How Mathematics Works hub for the wider series and its connections to education, reasoning, science, computing, design and careers.


1. Why markers can supervise a classifier

This step deserves a careful pause. Expert genes provide initial rules for selecting examples, while regression learns a broader transferable signature.

A concrete situation

CD3-related markers seed T-cell representatives.

What the mathematics does not license

Markers vary with state and technology. A trustworthy workflow records the choice before seeing the final test result.

Try it, check it, transfer it

Document evidence for every rule. 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. The marker markup language

The useful question is not only how to calculate, but what the calculation assumes. A readable file names cell types, hierarchy, positive markers, negative markers and rules.

A concrete situation

Subtype definitions sit beneath parent types.

What the mathematics does not license

Syntax can look precise while biology is incomplete. Evidence becomes stronger when the limitation is tested instead of hidden.

Try it, check it, transfer it

Validate the file before training. 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. Positive markers

A small example makes the mechanism visible. Expression of a positive marker supports membership in a declared type.

A concrete situation

A lineage gene selects candidate representatives.

What the mathematics does not license

Dropout can hide true expression. Keeping this boundary clear makes the result easier to audit and transfer.

Try it, check it, transfer it

Use multiple defensible markers. 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. Negative markers

This is where modelling choices begin to affect evidence. Negative rules argue against a type when incompatible genes are expressed.

A concrete situation

An epithelial marker excludes immune representatives.

What the mathematics does not license

True transitional states can express both. A trustworthy workflow records the choice before seeing the final test result.

Try it, check it, transfer it

Review contradictions rather than delete blindly. 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. Ambiguity checks

The central mathematical idea is concrete. Cells satisfying conflicting rules are not safe representative examples.

A concrete situation

A double-positive cell is excluded from seed training.

What the mathematics does not license

Over-strict rules yield too few examples. Evidence becomes stronger when the limitation is tested instead of hidden.

Try it, check it, transfer it

Report representative counts. 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. Representative cells

Here the geometry becomes operational. Unambiguous rule-matching cells become labelled training data for regression.

A concrete situation

A subset seeds the model for all cells.

What the mathematics does not license

Seed bias propagates to the classifier. Keeping this boundary clear makes the result easier to audit and transfer.

Try it, check it, transfer it

Inspect donors, batches 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.


7. Hierarchical training

This step deserves a careful pause. Separate models are trained from root to finer branches.

A concrete situation

Immune versus stromal precedes immune subtype.

What the mathematics does not license

An early mistake constrains later labels. A trustworthy workflow records the choice before seeing the final test result.

Try it, check it, transfer it

Save the full path and margins. 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. Multinomial logistic regression

The useful question is not only how to calculate, but what the calculation assumes. Each node uses linear scores for its child labels and normalises competing evidence.

A concrete situation

Gene weights separate several lineages.

What the mathematics does not license

Linear boundaries may miss complex interactions. Evidence becomes stronger when the limitation is tested instead of hidden.

Try it, check it, transfer it

Calculate a toy softmax. 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. Elastic-net penalty

A small example makes the mechanism visible. L1 and L2 penalties encourage sparse yet stable coefficients among correlated genes.

A concrete situation

A small gene set remains interpretable.

What the mathematics does not license

Penalty choice affects rare labels. Keeping this boundary clear makes the result easier to audit and transfer.

Try it, check it, transfer it

Cross-validate within training data. 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. Selected feature genes

This is where modelling choices begin to affect evidence. Learned non-zero coefficients show which genes help classification beyond the seed markers.

A concrete situation

A classifier reveals supportive genes.

What the mathematics does not license

A coefficient is predictive, not causal. A trustworthy workflow records the choice before seeing the final test result.

Try it, check it, transfer it

Publish signs, magnitudes and stability. 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. Cluster-agnostic classification

The central mathematical idea is concrete. Cells can be classified individually rather than inheriting a precomputed cluster label.

A concrete situation

Rare cells remain visible inside a broad cluster.

What the mathematics does not license

Noisy cells have weak evidence. Evidence becomes stronger when the limitation is tested instead of hidden.

Try it, check it, transfer it

Report per-cell confidence and unknowns. 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. Cluster-extended labels

Here the geometry becomes operational. Optional community context can extend labels to nearby cells.

A concrete situation

A coherent group supports borderline members.

What the mathematics does not license

Wrong cluster composition spreads error. Keeping this boundary clear makes the result easier to audit and transfer.

Try it, check it, transfer it

Compare initial and extended outcomes. 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. Unknown cells

This step deserves a careful pause. Cells outside the hierarchy or below support can remain unknown.

A concrete situation

A novel state is not forced into a leaf.

What the mathematics does not license

Low quality also creates unknown results. A trustworthy workflow records the choice before seeing the final test result.

Try it, check it, transfer it

Separate novelty and technical failure. 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. Cross-platform and species transfer

The useful question is not only how to calculate, but what the calculation assumes. Sparse gene classifiers can transfer when orthology and marker programmes are conserved.

A concrete situation

A model annotates another platform or species.

What the mathematics does not license

Gene mapping and context add assumptions. Evidence becomes stronger when the limitation is tested instead of hidden.

Try it, check it, transfer it

Validate each domain separately. 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. A student sparse-classifier project

A small example makes the mechanism visible. Write rules for three synthetic types, select seed points and fit elastic-net logistic models.

A concrete situation

Known truth exposes seed and penalty effects.

What the mathematics does not license

Real data add dropout and hierarchy. Keeping this boundary clear makes the result easier to audit and transfer.

Try it, check it, transfer it

Withhold a fourth type as unknown. 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 careers

This is where modelling choices begin to affect evidence. Version marker files, seed cells, hierarchy, penalties, coefficients, labels and unknown rules. Interpretable AI joins biology and mathematics.

A concrete situation

Students can begin with rules and linear scores.

What the mathematics does not license

A marker or coefficient proves no mechanism. A trustworthy workflow records the choice before seeing the final test result.

Try it, check it, transfer it

Write a classification 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

  1. Day 1: define the decision, observation unit, X variables and Y or reference condition.
  2. Day 2: reproduce the smallest worked example and check every dimension, unit and sign.
  3. Day 3: build a transparent baseline and write what it assumes.
  4. Day 4: fit the main method inside a training-only pipeline; record every parameter.
  5. Day 5: challenge one assumption with a deliberately difficult dataset or operating regime.
  6. Day 6: compare validation metrics with the practical workload created by errors.
  7. 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 Garnett audit begins with a hierarchical marker file containing positive and optional negative marker rules. Cells satisfying unambiguous rules become representative training examples. At each hierarchy node, multinomial elastic-net regression learns a sparse classifier that can be transferred to new datasets.

Record marker provenance, ambiguity checks, representative-cell counts, hierarchy, genes, penalties, selected coefficients, platform, cluster-extension settings and unknown outcomes. Markers seed training rather than prove every label; poor or context-specific rules can teach systematic error.

Validate with untouched datasets, withheld cell types, marker perturbation, coefficient stability, hierarchy-aware errors, unknown rates and original measurements. Interpretable rules and sparse coefficients make review easier, while external biological evidence remains necessary.


Frequently asked questions

What input knowledge does Garnett need?

It needs a marker file that describes cell types, positive markers, optional negative markers and hierarchical relationships.

What are representative cells?

They are cells that satisfy marker rules unambiguously enough to seed classifier training.

What classifier is trained?

Garnett trains multinomial elastic-net regression models at hierarchy nodes.

Why is elastic net useful?

It combines coefficient shrinkage and sparsity, selecting a compact set of informative genes while handling correlated features.

Can Garnett return unknown?

Cells that do not receive adequate support can remain unknown rather than being forced into a declared type.

How should Garnett be validated?

Use held-out datasets and types, marker perturbation, representative-cell audits, coefficient stability, hierarchical errors and unknown rates.


Primary source and fact-check note

Hannah A. Pliner, Jay Shendure and Cole Trapnell, “Supervised classification enables rapid annotation of cell atlases,” Nature Methods 16, 983–986 (2019), DOI 10.1038/s41592-019-0535-3. 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

Marker provenance

Cite the evidence, tissue, species and expected context for every positive and negative marker. Keep original wording and curator decisions beside the machine-readable rule.

Representative-cell audit

Report seed counts by type, donor, batch and state. Visualise conflicting-rule and unselected cells. A classifier trained on narrow seeds inherits that narrowness.

Marker perturbation

Remove or replace one rule at a time and retrain. Stable conclusions should not depend on one fragile marker, especially when dropout is common.

Penalty sensitivity

Cross-validate a defensible elastic-net grid inside biological folds. Compare selected genes, rare-class error and unknown rate. The sparsest model is not automatically the best.

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.

Hierarchy-aware errors

Distinguish wrong lineage, wrong subtype and correct parent-only outcomes. These mistakes have different meanings and costs.

Unknown challenge

Withhold a known type and measure how often it remains unknown versus being forced into a related leaf. Also separate low-quality unknowns from coherent novel clusters.

Cluster-extension log

Preserve labels before and after extension, cluster composition and every changed cell. Smoothing can repair noise or erase legitimate minorities.

Final claim

Name the marker file, representative cells, hierarchy, penalties, coefficient stability, held-out error and unknown policy. Interpretability improves review; it does not convert predictions into biological proof.

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: Why markers can supervise a classifier

Start with the mechanism: Expert genes provide initial rules for selecting examples, while regression learns a broader transferable signature. The worked case is concrete: CD3-related markers seed T-cell representatives. Expose the boundary: Markers vary with state and technology. Complete this evidence step: Document evidence for every rule. Write inputs, the mathematical operation, expected output, uncertainty and one observation that would contradict the claim. Repeat under a nearby defensible setting and compare scores, neighbours, paths or labels. Use untouched donors, studies or simulated truth because random cells can share hidden structure with training data. Keep measurement, model estimate, interpretation and decision on separate notebook lines so the conclusion remains auditable.

Workshop 2: The marker markup language

Start with the mechanism: A readable file names cell types, hierarchy, positive markers, negative markers and rules. The worked case is concrete: Subtype definitions sit beneath parent types. Expose the boundary: Syntax can look precise while biology is incomplete. Complete this evidence step: Validate the file before training. Write inputs, the mathematical operation, expected output, uncertainty and one observation that would contradict the claim. Repeat under a nearby defensible setting and compare scores, neighbours, paths or labels. Use untouched donors, studies or simulated truth because random cells can share hidden structure with training data. Keep measurement, model estimate, interpretation and decision on separate notebook lines so the conclusion remains auditable.

Workshop 3: Positive markers

Start with the mechanism: Expression of a positive marker supports membership in a declared type. The worked case is concrete: A lineage gene selects candidate representatives. Expose the boundary: Dropout can hide true expression. Complete this evidence step: Use multiple defensible markers. Write inputs, the mathematical operation, expected output, uncertainty and one observation that would contradict the claim. Repeat under a nearby defensible setting and compare scores, neighbours, paths or labels. Use untouched donors, studies or simulated truth because random cells can share hidden structure with training data. Keep measurement, model estimate, interpretation and decision on separate notebook lines so the conclusion remains auditable.

Workshop 4: Negative markers

Start with the mechanism: Negative rules argue against a type when incompatible genes are expressed. The worked case is concrete: An epithelial marker excludes immune representatives. Expose the boundary: True transitional states can express both. Complete this evidence step: Review contradictions rather than delete blindly. Write inputs, the mathematical operation, expected output, uncertainty and one observation that would contradict the claim. Repeat under a nearby defensible setting and compare scores, neighbours, paths or labels. Use untouched donors, studies or simulated truth because random cells can share hidden structure with training data. Keep measurement, model estimate, interpretation and decision on separate notebook lines so the conclusion remains auditable.

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: Ambiguity checks

Start with the mechanism: Cells satisfying conflicting rules are not safe representative examples. The worked case is concrete: A double-positive cell is excluded from seed training. Expose the boundary: Over-strict rules yield too few examples. Complete this evidence step: Report representative counts. Write inputs, the mathematical operation, expected output, uncertainty and one observation that would contradict the claim. Repeat under a nearby defensible setting and compare scores, neighbours, paths or labels. Use untouched donors, studies or simulated truth because random cells can share hidden structure with training data. Keep measurement, model estimate, interpretation and decision on separate notebook lines so the conclusion remains auditable.

Workshop 6: Representative cells

Start with the mechanism: Unambiguous rule-matching cells become labelled training data for regression. The worked case is concrete: A subset seeds the model for all cells. Expose the boundary: Seed bias propagates to the classifier. Complete this evidence step: Inspect donors, batches and states. Write inputs, the mathematical operation, expected output, uncertainty and one observation that would contradict the claim. Repeat under a nearby defensible setting and compare scores, neighbours, paths or labels. Use untouched donors, studies or simulated truth because random cells can share hidden structure with training data. Keep measurement, model estimate, interpretation and decision on separate notebook lines so the conclusion remains auditable.

Workshop 7: Hierarchical training

Start with the mechanism: Separate models are trained from root to finer branches. The worked case is concrete: Immune versus stromal precedes immune subtype. Expose the boundary: An early mistake constrains later labels. Complete this evidence step: Save the full path and margins. Write inputs, the mathematical operation, expected output, uncertainty and one observation that would contradict the claim. Repeat under a nearby defensible setting and compare scores, neighbours, paths or labels. Use untouched donors, studies or simulated truth because random cells can share hidden structure with training data. Keep measurement, model estimate, interpretation and decision on separate notebook lines so the conclusion remains auditable.

Workshop 8: Multinomial logistic regression

Start with the mechanism: Each node uses linear scores for its child labels and normalises competing evidence. The worked case is concrete: Gene weights separate several lineages. Expose the boundary: Linear boundaries may miss complex interactions. Complete this evidence step: Calculate a toy softmax. Write inputs, the mathematical operation, expected output, uncertainty and one observation that would contradict the claim. Repeat under a nearby defensible setting and compare scores, neighbours, paths or labels. Use untouched donors, studies or simulated truth because random cells can share hidden structure with training data. Keep measurement, model estimate, interpretation and decision on separate notebook lines so the conclusion remains auditable.

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: Elastic-net penalty

Start with the mechanism: L1 and L2 penalties encourage sparse yet stable coefficients among correlated genes. The worked case is concrete: A small gene set remains interpretable. Expose the boundary: Penalty choice affects rare labels. Complete this evidence step: Cross-validate within training data. Write inputs, the mathematical operation, expected output, uncertainty and one observation that would contradict the claim. Repeat under a nearby defensible setting and compare scores, neighbours, paths or labels. Use untouched donors, studies or simulated truth because random cells can share hidden structure with training data. Keep measurement, model estimate, interpretation and decision on separate notebook lines so the conclusion remains auditable.

Workshop 10: Selected feature genes

Start with the mechanism: Learned non-zero coefficients show which genes help classification beyond the seed markers. The worked case is concrete: A classifier reveals supportive genes. Expose the boundary: A coefficient is predictive, not causal. Complete this evidence step: Publish signs, magnitudes and stability. Write inputs, the mathematical operation, expected output, uncertainty and one observation that would contradict the claim. Repeat under a nearby defensible setting and compare scores, neighbours, paths or labels. Use untouched donors, studies or simulated truth because random cells can share hidden structure with training data. Keep measurement, model estimate, interpretation and decision on separate notebook lines so the conclusion remains auditable.

Workshop 11: Cluster-agnostic classification

Start with the mechanism: Cells can be classified individually rather than inheriting a precomputed cluster label. The worked case is concrete: Rare cells remain visible inside a broad cluster. Expose the boundary: Noisy cells have weak evidence. Complete this evidence step: Report per-cell confidence and unknowns. Write inputs, the mathematical operation, expected output, uncertainty and one observation that would contradict the claim. Repeat under a nearby defensible setting and compare scores, neighbours, paths or labels. Use untouched donors, studies or simulated truth because random cells can share hidden structure with training data. Keep measurement, model estimate, interpretation and decision on separate notebook lines so the conclusion remains auditable.

Workshop 12: Cluster-extended labels

Start with the mechanism: Optional community context can extend labels to nearby cells. The worked case is concrete: A coherent group supports borderline members. Expose the boundary: Wrong cluster composition spreads error. Complete this evidence step: Compare initial and extended outcomes. Write inputs, the mathematical operation, expected output, uncertainty and one observation that would contradict the claim. Repeat under a nearby defensible setting and compare scores, neighbours, paths or labels. Use untouched donors, studies or simulated truth because random cells can share hidden structure with training data. Keep measurement, model estimate, interpretation and decision on separate notebook lines so the conclusion remains auditable.

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: Unknown cells

Start with the mechanism: Cells outside the hierarchy or below support can remain unknown. The worked case is concrete: A novel state is not forced into a leaf. Expose the boundary: Low quality also creates unknown results. Complete this evidence step: Separate novelty and technical failure. Write inputs, the mathematical operation, expected output, uncertainty and one observation that would contradict the claim. Repeat under a nearby defensible setting and compare scores, neighbours, paths or labels. Use untouched donors, studies or simulated truth because random cells can share hidden structure with training data. Keep measurement, model estimate, interpretation and decision on separate notebook lines so the conclusion remains auditable.

Workshop 14: Cross-platform and species transfer

Start with the mechanism: Sparse gene classifiers can transfer when orthology and marker programmes are conserved. The worked case is concrete: A model annotates another platform or species. Expose the boundary: Gene mapping and context add assumptions. Complete this evidence step: Validate each domain separately. Write inputs, the mathematical operation, expected output, uncertainty and one observation that would contradict the claim. Repeat under a nearby defensible setting and compare scores, neighbours, paths or labels. Use untouched donors, studies or simulated truth because random cells can share hidden structure with training data. Keep measurement, model estimate, interpretation and decision on separate notebook lines so the conclusion remains auditable.

Workshop 15: A student sparse-classifier project

Start with the mechanism: Write rules for three synthetic types, select seed points and fit elastic-net logistic models. The worked case is concrete: Known truth exposes seed and penalty effects. Expose the boundary: Real data add dropout and hierarchy. Complete this evidence step: Withhold a fourth type as unknown. Write inputs, the mathematical operation, expected output, uncertainty and one observation that would contradict the claim. Repeat under a nearby defensible setting and compare scores, neighbours, paths or labels. Use untouched donors, studies or simulated truth because random cells can share hidden structure with training data. Keep measurement, model estimate, interpretation and decision on separate notebook lines so the conclusion remains auditable.

Workshop 16: Governance and careers

Start with the mechanism: Version marker files, seed cells, hierarchy, penalties, coefficients, labels and unknown rules. Interpretable AI joins biology and mathematics. The worked case is concrete: Students can begin with rules and linear scores. Expose the boundary: A marker or coefficient proves no mechanism. Complete this evidence step: Write a classification evidence card. Write inputs, the mathematical operation, expected output, uncertainty and one observation that would contradict the claim. Repeat under a nearby defensible setting and compare scores, neighbours, paths or labels. Use untouched donors, studies or simulated truth because random cells can share hidden structure with training data. Keep measurement, model estimate, interpretation and decision on separate notebook lines so the conclusion remains auditable.