Skip to content
Back to skills

Nystrom Pcg Solver

ASecurity

Solve regularized PSD systems with randomized Nyström preconditioned conjugate gradients and log convergence evidence.

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

Security analysis

A100/100

Scanned September 9, 2026

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

Installs into .claude/skills of the current project.

Are you the author of Nystrom Pcg Solver?

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

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

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

SKILL.md
---
name: nystrom_pcg_solver
description: Solve regularized PSD systems with randomized Nyström preconditioned conjugate gradients and log convergence evidence.
---

# Nyström PCG Solver

Use this skill to reproduce the paper's Algorithm 5.1 on a PSD linear system `(A + mu I)x=b`. It should call or mirror the generated Nyström factorization and preconditioner contracts rather than bypassing them.

## Inputs

- Dense PSD matrix or matrix-vector product interface.
- Right-hand side `b`.
- Regularization `mu > 0`.
- Sketch rank `ell`, tolerance, maximum iterations, and random seed.

## Outputs

- Approximate solution.
- Residual history, relative residual history, and iteration count.
- Mechanism diagnostics: factorization executed, preconditioner applications, CG step count, and convergence flag.

## Workflow

1. Build Nyström factors with `randomized_nystrom_factorization`.
2. Build an inverse preconditioner action with `nystrom_preconditioner`.
3. Run left-preconditioned CG using preconditioned residual inner products.
4. Optionally run ordinary CG as a baseline under the same tolerance.
5. Save traces for downstream recovery evaluation.

## Validation

Run:

```bash
python scripts/pcg.py --self-test
python tests/test_pcg.py
```

The tests use a deterministic ill-conditioned PSD system and require Nyström PCG to converge in fewer iterations than ordinary CG.

## Limitations

This dense script is designed for bounded recovery experiments. For large paper-scale systems, replace dense arrays with matvec closures while preserving the same logging contract.

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…