Skip to content
Back to skills

Alpha Subset Protocol

ASecurity

Generate and validate fixed-cardinality alpha-subset membership matrices for datamodel training and recovery experiments.

  • 247 stars
  • 0 votes
  • 0 copies
  • 1 view
  • Added September 9, 2026
testingpythonbash

Security analysis

A100/100

Scanned September 9, 2026

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

Installs into .claude/skills of the current project.

Are you the author of Alpha Subset Protocol?

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

Security grade badge for Alpha Subset Protocol
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/vectorspacelab-alpha-subset-protocol/badge)](https://www.skillsdirectory.com/skills/vectorspacelab-alpha-subset-protocol)

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

SKILL.md
---
name: alpha_subset_protocol
description: Generate and validate fixed-cardinality alpha-subset membership matrices for datamodel training and recovery experiments.
---

# Alpha-Subset Protocol

Use this skill when a datamodel experiment needs membership vectors sampled from an alpha-fraction subset distribution. Do not use it for variable-size bootstrap subsets unless the caller explicitly declares a different subset distribution.

## Inputs

- Base training-set size `d`.
- Subsampling fraction `alpha` in `(0, 1]`.
- Number of subsets `num_subsets`.
- Integer random seed.

## Outputs

- Binary membership matrix as JSON or a Python list of lists.
- Metadata with `d`, `alpha`, `subset_size`, `num_subsets`, and `seed`.

## Workflow

1. Validate dimensions and alpha.
2. Compute `subset_size = max(1, round(alpha * d))`.
3. Sample each subset without replacement using a deterministic local RNG.
4. Validate that every row is binary and has the exact subset size.
5. Pass both matrix and metadata to datamodel fitting.

## Validation

Run:

```bash
python scripts/subset_protocol.py --d 8 --alpha 0.5 --num-subsets 4 --seed 3
python tests/test_subset_protocol.py
```

## Limitations

This skill samples membership only. It does not train base models or compute target outcomes.

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…