Skip to content
Back to skills

Nystrom Preconditioner

ASecurity

Build and apply the inverse action of the Nyström preconditioner for regularized PSD linear systems.

  • 247 stars
  • 0 votes
  • 0 copies
  • 2 views
  • Added September 9, 2026
testingpythongobash

Security analysis

A100/100

Scanned September 9, 2026

npx -y skills add VectorSpaceLab/AREX-Skill --skill nystrom_preconditioner --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Nystrom Preconditioner?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Nystrom Preconditioner
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/vectorspacelab-nystrom-preconditioner/badge)](https://www.skillsdirectory.com/skills/vectorspacelab-nystrom-preconditioner)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

SKILL.md
---
name: nystrom_preconditioner
description: Build and apply the inverse action of the Nyström preconditioner for regularized PSD linear systems.
---

# Nyström Preconditioner

Use this skill after obtaining `U, lambda_hat` from a randomized Nyström factorization. It provides the inverse preconditioner action used by Nyström PCG and dense diagnostics for small recovery experiments.

## Inputs

- `U`: orthonormal Nyström basis.
- `lambda_hat`: nonnegative approximate eigenvalues.
- `mu > 0`: regularization parameter.
- Residual vector or right-hand-side matrix.

## Outputs

- `apply_inverse_preconditioner(U, lambda_hat, mu, r)` result.
- Preconditioner metadata, including rank and baseline scale.
- Optional condition-number comparison for `A + mu I` versus the symmetrically preconditioned matrix.

## Workflow

1. Validate dimensions, `mu`, and approximate orthonormality.
2. Sort eigenpairs by decreasing `lambda_hat` if necessary.
3. Set `sigma = lambda_hat[-1] + mu`.
4. Apply `P^{-1}` by scaling captured components with `sigma / (lambda_hat_i + mu)` and leaving orthogonal components unchanged.
5. For dense recovery checks, construct the SPD square-root action and estimate condition numbers.

## Validation

Run:

```bash
python scripts/preconditioner.py --self-test
python tests/test_preconditioner.py
```

The tests verify inverse-action shape, dimension checks, and condition-number reduction on a diagonal PSD example.

## Limitations

Dense condition-number diagnostics are intended for small experiments. Large systems should only use the vector action.

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments

Loading comments…