SPB Git

spb/metrika Public

Stata-class statistics, GPU-accelerated by Apple Silicon. Native Swift — no Electron, no Python runtime, no compromises.

Swift 92.4% HTML 3.3% R 3% Shell 1.3%

History of MetrikaKit/Sources/ZQEngine/CommandHelp.swift · clear filter

  1. feat: v1.0 features — sample datasets, docs site, Metal 2M-point renderer
    - sysuse command with bundled samples (sales: 200-firm x 5-year panel;
      mtcars) shipped as ZQEngine resources, generated by
      scripts/make_samples.R
    - metrika-cli docs: static documentation site rendered from the shared
      command registry (docs/index.html, 38 commands, light/dark); CLI
      restructured with a default 'run' subcommand
    - Metal point-sprite renderer (CLAUDE.md §7 pane 4): packed 12-byte
      vertices, unified-memory buffer written once, scroll-pan /
      pinch-zoom / double-click-reset touching only a 24-byte uniform;
      takes over scatter plots past 100k points (METRIKA_METAL_THRESHOLD
      override for tests); verified rendering 2,000,000 points in-app
    - METRIKA_AUTORUN debug hook for headless app driving
    - MARKETING_VERSION 1.0.0
    - 116 kit tests + 4 UI tests green
    
    Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
    simon-pierre boucher committed 6 days ago (Aug 5, 2026) · 1 file changed +7
  2. feat(stats): gradient-boosted regression trees (boost command)
    - ZQGradientBoosting: exact-greedy trees cloning xgboost's algorithm —
      gain 1/2[GL2/(HL+l) + GR2/(HR+l) - G2/(H+l)] - gamma, leaf -G/(H+l),
      midpoint splits between consecutive distinct values, missing rows
      default left, pre-sorted feature indices; squared loss, deterministic
      (no subsampling)
    - engine: 'boost y x…, rounds(#) [eta() maxdepth() lambda()]' reporting
      training R2/RMSE with an in-sample caveat; model stored in the
      estimation state (Kind.boost) so predict routes through the trees
      (missing features follow the default direction); margins and GLM
      statistics refused after boost
    - validation: per-observation prediction parity with R xgboost 3.2
      (exact method, base_score = mean) at 1e-4 (xgboost is float32
      internally); a stump finds the exact midpoint split with lambda 0;
      training loss decreases monotonically in rounds
    - manual entry + coverage test
    - 115 tests green (swift test and xcodebuild with GPU suites)
    
    Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
    simon-pierre boucher committed 6 days ago (Aug 5, 2026) · 1 file changed +14
  3. feat(stats): Bayesian linear regression via Gibbs sampling (bayes prefix)
    - PhiloxStream in ZQGPU: sequential variate stream over a dedicated
      counter block (bit 62 + per-stream 2^48 words, disjoint from bootstrap
      and permutation streams); Box-Muller normals, Marsaglia-Tsang gammas
      (moments verified against theory at 200k draws)
    - ZQBayesianRegression: semi-conjugate Gibbs with Stata bayes default
      priors (coefficients N(0, 10000), variance InvGamma(.01, .01)); exact
      full conditionals via dense Cholesky; posterior mean/sd and
      equal-tailed 95% credible intervals; ZQStats now depends on ZQGPU for
      the shared RNG
    - engine: 'bayes [, mcmcsize() burnin() seed() normalprior()]: reg …'
      with reproducible chains; manual entry included
    - validation: with diffuse priors the posterior reproduces OLS (mean
      within 5% of a posterior SD, sd ratio in [0.9, 1.15], CrI brackets the
      estimate, sigma recovers the DGP); tight priors shrink toward zero;
      chains bit-reproducible per seed
    - 111 tests green (swift test and xcodebuild with GPU suites)
    
    Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
    simon-pierre boucher committed 6 days ago (Aug 5, 2026) · 1 file changed +13
  4. feat(app): user manual — in-app reference and console help
    - ZQCommandReference: one registry of every command (syntax, options,
      examples, notes) shared by the console and the app so they cannot
      drift; 35 commands across 10 categories
    - console: 'help' lists the reference by category, 'help <command>'
      (abbreviations resolve too) renders the full entry
    - app: Manual pane — searchable sidebar grouped by category, per-command
      pages (syntax/options/examples), and a 'How Metrika works' overview
      covering the command grammar, data handling, estimation conventions,
      the CPU/GPU planner, reproducibility, and user commands
    - release plumbing: real team ID + notary keychain-profile NAME in
      release.sh (both configuration, not credentials, per the security
      conventions), manual Developer ID signing with hardened runtime,
      -skipPackagePluginValidation, DMG background art
    - tests: help coverage test pins a manual entry for every implemented
      verb; UI smoke drives the Manual pane; 106 green
    
    Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
    simon-pierre boucher committed 6 days ago (Aug 5, 2026) · 1 file changed +331