Skip to content

CLI: bench sparse command #48

@jc-macdonald

Description

@jc-macdonald

Summary

Implement vbpca-py bench sparse — benchmark sparse/masked VBPCA fit. Replaces scripts/benchmark_sparse_mask_explicit.py.

Depends on #40 (CLI scaffolding).

Usage

vbpca-py bench sparse
vbpca-py bench sparse --n 100,500 --p 100,500 --k 5 --miss 0.1,0.3,0.5 --reps 3 --output sparse_bench.json

Flags

Same as bench shape plus:

Flag Default Notes
--miss LIST 0.1,0.3,0.5 Comma-separated missingness fractions
--pattern mcar Missingness pattern: mcar, mnar_censored, blockwise, monotone

Output format

Same JSON structure as bench shape, with additional missingness and pattern fields per result entry.

Implementation notes

  • Port from scripts/benchmark_sparse_mask_explicit.py
  • Use the same mask-generation utilities as the stability analysis
  • Include explicit-mask size statistics (nnz, density) in the output

Acceptance criteria

  • vbpca-py bench sparse prints a table to stdout
  • JSON output includes missingness fraction and pattern
  • Multiple missingness levels work
  • Sparse kernel actually exercises the C++ sparse path

Metadata

Metadata

Assignees

No one assigned

    Labels

    benchmarkPerformance benchmarks and profilingcliCommand-line interface

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions