Skip to content

fix: LaTeX rendering, Exercise C worked example, Python 3.11+ requirements, Sphinx docs#4

Merged
MacroMagic merged 2 commits into
mainfrom
copilot/fix-latex-rendering-and-exercise-c
Apr 19, 2026
Merged

fix: LaTeX rendering, Exercise C worked example, Python 3.11+ requirements, Sphinx docs#4
MacroMagic merged 2 commits into
mainfrom
copilot/fix-latex-rendering-and-exercise-c

Conversation

Copilot AI commented Apr 19, 2026

Copy link
Copy Markdown
Contributor

Summary

Addresses all four items from the problem statement.

Changes

1 — Fix LaTeX rendering in notebook section "1) Mathematical intuition"

  • All markdown cells in the demo notebook that used \(...\) / \[...\] LaTeX delimiters (cells 1 and 9) have been converted to the universally-supported $...$ / $$...$$ notation. Both classic Jupyter Notebook and JupyterLab render these via MathJax without additional configuration.

2 — Worked example for Exercise C (correlated predictors)

  • Added two new cells (7c) immediately after the Exercise A sweep:
    • Markdown cell: Explains the identifiability challenge posed by correlated features and what to expect from each selection method.
    • Code cell: Builds 4 blocks of 5 features with within-block correlation ρ = 0.9, places a true signal in the first feature of each block, fits HorseshoeGLM with MCMC, then compares method='beta', 'lambda', and 'both' side-by-side (precision / recall / F1 table + bar-chart of inclusion probabilities). Ends with a plain-language discussion of why posterior mass spreads and when alternative priors may be preferable.

3 — Remove Python < 3.11 support

  • pyproject.toml: Added requires-python = ">=3.11" and removed 3.9/3.10 classifiers.
  • tox.ini: Updated envlist to py311, py312 and updated the [travis] mapping.
  • .travis.yml: Updated test matrix to 3.11 and 3.12; updated the deployment python key to 3.11.

4 — Fix Sphinx doc build errors

  • docs/conf.py: Added sys.modules pre-mocking of heavy C-extension dependencies (JAX, NumPyro, ArviZ, scikit-learn, etc.) using unittest.mock.MagicMock so that bayesian_feature_selection can be imported without those packages being installed. Also added autodoc_mock_imports for the same list so that sphinx.ext.autodoc resolves type annotations correctly. The Sphinx build now completes successfully (build succeeded, 0 warnings, 0 errors).

@MacroMagic
MacroMagic marked this pull request as ready for review April 19, 2026 14:21
@MacroMagic
MacroMagic merged commit e929711 into main Apr 19, 2026
2 of 5 checks passed
@MacroMagic
MacroMagic deleted the copilot/fix-latex-rendering-and-exercise-c branch April 19, 2026 14:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants