# Understand Theory

> Extract mathematical formulation, statistical models, and theoretical foundations from a bioinformatics method paper

- Skill: `yyw-informatics/understand-theory-2` (Agent Skill)
- Install (CLI): `npx get-skill add yyw-informatics/understand-theory-2`
- Raw SKILL.md: https://api.skillmd.com/api/skills/yyw-informatics/understand-theory-2/raw
- Safety review: pending
- Works with: any agent that reads SKILL.md (Claude Code, Claude.ai, Cursor, Codex, Windsurf, 60+ more)
- Category: Coding & Dev Tools
- Author: yyw-informatics (https://skillmd.com/u/yyw-informatics)
- Updated: 2026-11-28
- Page: https://skillmd.com/skills/yyw-informatics/understand-theory-2

---

---
name: understand-theory
description: Extract mathematical formulation, statistical models, and theoretical foundations from a bioinformatics method paper
argument-hint: [method-name]
allowed-tools: Read, Glob, Grep, Write, AskUserQuestion, WebFetch, Bash(mkdir *)
---

# Understand Theory Skill

You are helping build a knowledge base of single-cell bioinformatics methods. Your task is to extract the mathematical and statistical foundations from a method paper.

## Prerequisites

This skill assumes `/read-paper` has already been run for this method. Check that `knowledge_base/<method_name>/concept.md` exists.

## Workflow

### Step 1: Locate Resources

1. Check if the concept.md exists for this method
2. Read the original paper PDF
3. **Critically**: Ask user for supplementary materials if not already available:
   - Supplementary PDF
   - Supplementary Note
   - Online methods
   - GitHub documentation with mathematical details

### Step 2: Identify Mathematical Components

Extract and document:

#### Core Algorithm / Model
- What is the mathematical formulation?
- What type of model? (probabilistic, optimization, heuristic, etc.)
- What are the key equations?

#### Statistical Framework
- What statistical assumptions are made?
- What distributions are used?
- What estimation methods? (MLE, Bayesian, non-parametric, etc.)

#### Key Variables and Notation
- Define all mathematical notation used
- Input variables
- Output variables
- Parameters to be estimated
- Hyperparameters

#### Objective Function (if applicable)
- What is being optimized?
- Loss function / likelihood
- Regularization terms

#### Algorithm Steps
- Pseudocode or step-by-step mathematical procedure
- Initialization
- Iteration / convergence criteria

#### Theoretical Properties
- Convergence guarantees?
- Computational complexity?
- Identifiability?

### Step 3: Create Theory Documentation

Create the output file at: `knowledge_base/<method_name>/theory.md`

Use this template structure:

```markdown
---
name: <method_name>
theory_type: <probabilistic|optimization|heuristic|hybrid>
statistical_framework: <bayesian|frequentist|non_parametric|etc>
---

# <Method Name> - Mathematical Formulation

## Overview

<Brief summary of the mathematical approach>

## Notation

| Symbol | Description |
|--------|-------------|
| ... | ... |

## Core Model / Algorithm

<Main mathematical formulation with equations>

## Statistical Assumptions

<What assumptions does the method make?>

## Key Equations

### Equation 1: <Name>
$$
<equation>
$$

<Explanation of what this equation does>

### Equation 2: <Name>
...

## Algorithm Steps

1. **Step 1**: ...
2. **Step 2**: ...
...

## Objective Function

<If applicable, what is being optimized?>

## Parameter Estimation

<How are parameters estimated?>

## Computational Complexity

<Time and space complexity if discussed>

## Theoretical Guarantees

<Convergence, identifiability, etc.>

## References to Original Formulation

<Point to specific sections/figures in the paper and supplementary>

---

*Generated by `/understand-theory` skill*
```

### Step 4: Handle Missing Information

If supplementary materials are not available:
1. Extract what's available from the main paper Methods section
2. Note which mathematical details are missing
3. Suggest checking the GitHub repository for additional documentation
4. Flag sections that need supplementary materials to complete

### Step 5: Verify and Refine

Re-read the generated `theory.md` and perform an editorial review:

#### Completeness Check
- [ ] All notation defined in the Notation table before first use
- [ ] Every key equation has an explanation of what it represents
- [ ] Algorithm steps are numbered and unambiguous
- [ ] Parameter estimation method is documented
- [ ] Computational complexity noted (if available)

#### Mathematical Rigor
- [ ] LaTeX equations render correctly (balanced delimiters, proper symbols)
- [ ] Variables use consistent notation throughout (no mixing X and x for same thing)
- [ ] Subscripts/superscripts are meaningful and explained
- [ ] Distributions are fully specified (e.g., "N(μ, σ²)" not just "normal distribution")

#### Flow and Clarity
- [ ] Document flows from high-level overview → detailed equations → algorithm steps
- [ ] Complex equations are broken into digestible components
- [ ] Connections between equations are explained (how one leads to another)
- [ ] References to paper/supplementary sections are accurate

#### Efficiency Improvements
- Consolidate redundant explanations
- Ensure notation table includes ALL symbols (scan equations to verify)
- Remove verbose introductions to equations ("The following equation shows...")
- Group related equations together with clear subsection headers

Make corrections directly to the file, then proceed to confirm completion.

## Important Notes

- Use LaTeX notation for equations ($$...$$) for proper rendering
- Be precise with mathematical notation - define every symbol
- Distinguish between:
  - User-specified hyperparameters
  - Parameters estimated from data
  - Fixed constants
- Note where formulas come from (main paper vs supplementary vs GitHub)
- If the method is primarily heuristic (no formal model), document the algorithmic steps clearly

