docs(examples): Add comprehensive convex optimization examples#61
Merged
noahgift merged 1 commit intoNov 23, 2025
Merged
Conversation
Add 5 comprehensive examples demonstrating Phase 2 convex optimization methods: 1. Lasso Regression with FISTA - Sparse recovery with L1 regularization - Demonstrates soft-thresholding proximal operator - Achieves excellent sparsity recovery 2. Non-Negative Least Squares with FISTA - Constrained optimization with non-negativity - Shows projection onto non-negative orthant - Applications in spectral unmixing, image processing 3. High-Dimensional Lasso with Coordinate Descent - 100 features, 30 samples (n >> m scenario) - Coordinate-wise soft-thresholding updates - Demonstrates efficiency for high-dimensional problems 4. Box-Constrained Quadratic Programming - Coordinate descent with bound constraints - Convergence in just 5 iterations - Shows constraint satisfaction tracking 5. FISTA vs Coordinate Descent Comparison - Side-by-side performance comparison - Both methods achieve identical solutions - CD: 4 iterations (146.9µs) - FISTA: 45 iterations (256.1µs) - Guidance on when to use each method All examples include: - Clear problem formulation and mathematical background - Practical problem setup with realistic data - Convergence monitoring and validation - Solution quality analysis - Performance metrics Total: ~650 lines of comprehensive documentation and working code demonstrating Phase 2 convex optimization capabilities.
noahgift
added a commit
that referenced
this pull request
Apr 18, 2026
…contract (#110) FALSIFY-CLI-002/005 failed on feat/pm-007-preflight-poka-yoke: `apr --help` exposed 59 commands but registered_commands() had 57. Two commands were missing from the Rust-side mirror: - validate-manifest (AC-EX-004 tool, task #61) — added in earlier slice but never wired into the test vec. - pretrain (task #105 MODEL-2 pretrain loop) — added to CLI but never added to the contract YAML or the test vec. Fix: - Add pretrain entry to contracts/apr-cli-commands-v1.yaml (category: training). - Add validate-manifest + pretrain to registered_commands() in the test. - cfg_attr allow(unused_mut) on the vec for non-`code`-feature builds. Local: `cargo test -p apr-cli --test cli_commands` — 6/6 PASS. `pv validate contracts/apr-cli-commands-v1.yaml` — 0 errors, 0 warnings. Unblocks task #95 (open PR against main for SHIP-TWO-001 work). Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Add 5 comprehensive examples demonstrating Phase 2 convex optimization methods:
Lasso Regression with FISTA
Non-Negative Least Squares with FISTA
High-Dimensional Lasso with Coordinate Descent
Box-Constrained Quadratic Programming
FISTA vs Coordinate Descent Comparison
All examples include:
Total: ~650 lines of comprehensive documentation and working code demonstrating Phase 2 convex optimization capabilities.