Skip to main content

Feature Selection Playbook

A guided, leakage-safe feature-selection screening you run with Claude Code. It hands back a documented notebook — a ranked, reasoned shortlist with a verdict + reason for every column. It is a screening tool, not an auto-selector: the human makes the final call.

Three docs, three jobs:

  • PLAYBOOK.md — the guide: the method (Parts A–H), decision rules, thresholds, and the exact §17 math.
  • TOOLS.md — the catalogue of the fsp package: the deterministic tools you call.
  • CLAUDE.md — the entry: operating instructions Claude Code reads when it runs the screening.

Install & start in a new folder

⚠️ Use Python 3.12. optbinning (→ ortools) has no Python 3.13 wheel yet, so a 3.13 environment will fail to install. Pin 3.12 as shown.

# 1. create the project ON Python 3.12 (do it in one step — see the note above)
uv init my-analysis --python 3.12 && cd my-analysis

# 2. install fsp from PyPI
uv add feature-selection-playbook     # or: pip install feature-selection-playbook

# 3. scaffold the guide docs + the phase-code starter into the folder
uv run fsp init          # writes CLAUDE.md, PLAYBOOK.md, TOOLS.md, analysis/{screening.py,parts.py} + a gitignored runs/

fsp init drops the phase-code home under analysis/: a screening.py runner and parts.py with one run_<x>(ctx) per part (A→H). Fill parts.py one part at a time (run it, read the output, decide, document, gate, then the next — PLAYBOOK.md §3.1). Run a single part without recomputing the rest:

python analysis/screening.py c   # runs ONLY Part C — resumes prior state from the checkpoint
python analysis/screening.py     # runs the whole chain A→H

Each part ctx.checkpoint()s its state so the next part resumes it; results.ipynb updates only the section you touch (it is never regenerated wholesale).

The three guide docs are gitignored in your project (they come from the package — regenerate any time with fsp init), so your repo tracks only analysis/ and your data.

Then drop your data in the folder and either open it in Claude Code (it reads CLAUDE.md and drives the whole screening) or use fsp directly in a notebook:

import fsp

ctx = fsp.open_run("data.csv", target="churn", target_type="binary", run_id="churn")
# Claude follows PLAYBOOK.md Parts A→H, calling the fsp tools (see TOOLS.md):
# frame → viability → inventory → values → partition → relevance → redundancy → verdict

Claude reads CLAUDE.md, runs each part as compute → decide → document → verify, and grows the notebook a section per part.

What you get (under runs/<run-id>/)

  • results.ipynb (+ results.html) — the documented report, a section per part.
  • ledger.parquet — one row per column: verdict + reason + numbers (dropped columns stay, with their numbers).
  • folds.json, manifest.json — the frozen split and a reproducibility manifest (fixed seed).

Develop fsp

uv sync
uv run pytest                              # the test suite
uv run ruff check src tests && uv run mypy src

The fsp package lives in src/fsp/, organized in four layers (foundation → metrics → parts → report); see TOOLS.md for the full tool catalogue.

Metadata

Release files for feature-selection-playbook 0.2.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for feature-selection-playbook 0.2.0
File Size Uploaded
feature_selection_playbook-0.2.0.tar.gz 223.5 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for feature-selection-playbook 0.2.0
File Interpreter ABI Platform
feature_selection_playbook-0.2.0-py3-none-any.whl Python 3 none any Details

Total release size: 307.6 kB

Release files / feature_selection_playbook-0.2.0.tar.gz

Download URL feature_selection_playbook-0.2.0.tar.gz
Size 223.5 kB
Tags Source
SHA-256 checksum
How to use checksums
2bd006ea4f85d3b1b8b50739c6dab84c12e167d782006dbbde77e2c0da45430c
BLAKE2b-256 checksum
How to use checksums
5ef5a4a6b5a323a40d109f3bb6a003ebfb017111371bf5a9390d9756d9e8f5bb
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.11.14 {"installer":{"name":"uv","version":"0.11.14","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

Release files / feature_selection_playbook-0.2.0-py3-none-any.whl

Download URL feature_selection_playbook-0.2.0-py3-none-any.whl
Size 84.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
fb0078f3ec8970ef101483765594d71900db6afd34b9df8368bd565110d4b3f3
BLAKE2b-256 checksum
How to use checksums
c421c76893e8fdcab6097c8c1ff1010c33fa8829212291d9a1d9bc3d84a3153e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.11.14 {"installer":{"name":"uv","version":"0.11.14","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

Release history Release notifications | RSS feed

This release

0.2.0 This release

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page