numerical-methods
Skill by brycewang-stanford
numerical-methods gives an AI assistant guidance on numerical stability in statistical computing. It covers log-scale math, matrix solving, optimization checks and root finding, with examples written in R.
Install numerical-methods
Built from the published package, never by AI.
git clone --depth 1 https://github.com/brycewang-stanford/Auto-Empirical-Research-Skills /tmp/Auto-Empirical-Research-Skills && mkdir -p ~/.claude/skills && cp -r /tmp/Auto-Empirical-Research-Skills/skills/26-Data-Wise-scholar/skills/implementation/numerical-methods ~/.claude/skills/numerical-methodsRun in your terminal. Claude Code loads skills from ~/.claude/skills automatically.
git clone --depth 1 https://github.com/brycewang-stanford/Auto-Empirical-Research-Skills /tmp/Auto-Empirical-Research-Skills && mkdir -p ~/.gemini/antigravity-cli/skills && cp -r /tmp/Auto-Empirical-Research-Skills/skills/26-Data-Wise-scholar/skills/implementation/numerical-methods ~/.gemini/antigravity-cli/skills/numerical-methodsAntigravity CLI loads skills from ~/.gemini/antigravity-cli/skills, or .agents/skills for one project.
Skills can run scripts on your machine. Some need an API key: check the README.
About
numerical-methods is an agent skill that gives an AI assistant guidance on numerical stability in statistical computing. It covers IEEE 754 double precision limits, catastrophic cancellation, overflow and underflow, and the log-sum-exp and softmax tricks. It also covers matrix conditioning and solving linear systems with QR, Cholesky and SVD, plus checks on gradients and Hessians.
The skill adds guidance on Newton-Raphson and uniroot root finding, numerical integration, Monte Carlo estimates, and a bootstrap wrapper that handles errors. It ends with a debugging checklist and a list of best practices. The examples are written in R and use the MASS package. It is written for people doing statistical computing who need stable calculations.
Written from the project's SKILL.md and checked against it.
What it can do
- Floating-point referenceLists double precision limits and R constants such as .Machine$double.eps.
- Overflow and underflow fixesShows how to work on the log scale for products of probabilities and likelihoods.
- Log-sum-exp and softmaxProvides stable versions of log-sum-exp and softmax functions.
- Matrix conditioningExplains condition numbers and how to check X'X conditioning before solving.
- Linear system solvingRecommends QR, Cholesky and SVD or pseudoinverse methods over explicit inversion.
- Gradient and Hessian checksIncludes a numerical gradient function and a Hessian positive definiteness check.
- Line search and root findingProvides a backtracking Armijo line search and Newton-Raphson with a derivative check.
- Integration and Monte CarloCovers adaptive quadrature with integrate() and a Monte Carlo integration function.
- Safe bootstrapWraps bootstrap resampling in error handling and warns when failures exceed 10 percent.
- Debugging checklistLists steps to find NaN, Inf, conditioning and scaling problems in numerical code.
What you need
- R
- MASS package
Try asking
- Show me how to compute a stable log-likelihood for a normal model in R.
- Check whether my regression matrix X is ill-conditioned and suggest a solver.
- Write a safe bootstrap function that reports failure rates in R.
Good to know
- Mostly guidance and code snippets rather than a packaged tool.
- Examples are written in R.
Security check
ANo download-and-run commands, hidden instructions or signs of sending keys out were found.
Checked automatically: skills/26-Data-Wise-scholar/skills/implementation/numerical-methods/SKILL.md. This looks for known risky patterns and is not a full audit. How grades work
Alternatives to numerical-methods
All alternatives →Searches arXiv for scientific papers and preprints, extracts their metadata and abstracts, and downloads PDF or HTML full text. Suited to users who need research papers, literature or specific arXiv IDs.
Downloads AlphaFold predicted structures and PAE matrices for a UniProt ID, then reports pLDDT confidence, domain boundaries and disorder. Built for users who already have a UniProt accession.
Queries the QuickGO and Evidence & Conclusion Ontology REST API to map genes to Gene Ontology terms. Built for researchers doing functional annotation and GO hierarchy exploration.
Connects an AI assistant to Peloton to browse fitness classes, check live and archived schedules, and manage workouts. Built for Peloton users who want to plan rides from their assistant.
Queries NCBI Gene through the E-utilities and Datasets API. It helps researchers search genes by symbol or ID, retrieve gene details, and run batch lookups for annotation and functional analysis.
Prepares and launches nf-core/pacsomatic runs for matched tumor-normal PacBio HiFi data starting from unaligned BAM files. It generates samplesheets and pinned launch artifacts, then runs locally or submits to a scheduler.
Compare with literature-search-arxiv, alphafold-database-fetch-and-analyze or quickgo-database
numerical-methods: common questions
What does numerical-methods cover?
It covers floating-point limits, log-scale computation, matrix conditioning and solving, optimization checks, integration, root finding and bootstrap error handling for statistical code.
Does numerical-methods use R?
Yes. The code examples in the source are written in R and use the MASS package for a generalized inverse.
Does numerical-methods include a log-sum-exp function?
Yes. The source includes a log_sum_exp function and a stable softmax function, with examples of where the naive versions fail.
How do I install numerical-methods?
Run the command above to copy the skill into ~/.claude/skills/. Claude Code picks it up automatically.
Is numerical-methods free?
The code is published under the NOASSERTION licence. The service it connects to may have its own pricing.
Is numerical-methods safe to use?
It scores 74 of 100. Grades: maintenance A, licence F, quality A. Security check: grade A, no risky patterns found in the files checked. Review the code before you install. How grades work.
What are alternatives to numerical-methods?
Similar skills: literature-search-arxiv, alphafold-database-fetch-and-analyze, quickgo-database, peloton.
