🌐 [translation-sync] [exchangeable] Simplify code and bring lecture into style-guide compliance - #233
🌐 [translation-sync] [exchangeable] Simplify code and bring lecture into style-guide compliance#233mmcky wants to merge 2 commits into
Conversation
✅ Deploy Preview for astonishing-narwhal-a8fc64 ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
✅ Translation Quality ReviewVerdict: PASS | Model: claude-sonnet-5 | Date: 2026-08-03 📝 Translation Quality
Summary: The translation of the changed sections is accurate, fluent, and terminologically consistent with the glossary. The main concern is the unexplained addition of matplotlib font-configuration code in the imports cell, which alters the executable code compared to the source and should be flagged/verified. Minor spacing inconsistencies between Chinese text and Latin letters (F/G) appear in a few code comments and legend labels. Mathematical notation, equations, and LaTeX labels are preserved accurately throughout all changed sections New subsections (The likelihood ratio, densities, belief dynamics, another instance) are translated fluently and consistently with correct technical vocabulary Glossary terms such as 独立同分布, 可交换性, 贝叶斯定律, 似然比, 先验/后验概率 are used consistently and correctly Suggestions:
🔍 Diff Quality
Summary: The translation sync correctly mirrors all structural, frontmatter, code-refactoring, and heading-map changes from the English source in the same relative positions. This review was generated automatically by action-translation review mode. |
There was a problem hiding this comment.
Pull request overview
This automated translation-sync PR updates the Chinese MyST lecture exchangeable.md to match upstream style-guide compliant changes from QuantEcon/lecture-python.myst, including refactoring the lecture’s plotting/simulation code and refreshing Jupytext/translation metadata.
Changes:
- Updated Jupytext/front-matter metadata (kernel display name, jupytext versions) and refined translation heading mappings.
- Refactored the “Bayesian updating” visualization code into smaller reusable functions and rewrote the simulation section to use vectorized odds/cumulative products.
- Updated translation sync state (
source-sha,synced-at, mode, tool-version).
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| lectures/exchangeable.md | Syncs lecture content/code with upstream refactor + style-guide compliance updates. |
| .translate/state/exchangeable.md.yml | Updates translation-sync tracking metadata for the new upstream source commit. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| ax.plot(f(w_grid), w_grid, label='$f$', lw=2) | ||
| ax.plot(g(w_grid), w_grid, label='$g$', lw=2) | ||
| ax.vlines(1, 0, 1, linestyle='--') | ||
| ax.hlines(roots, 0, 2, linestyle='--') | ||
| ax.legend(loc=4) | ||
| ax.set(xlabel='$f(w), g(w)$', ylabel='$w$') | ||
|
|
||
| # 无论哪个密度函数被着色,落入各区域的概率 | ||
| area_lower = quad(f, 0, roots[0])[0] | ||
| area_middle = quad(g, roots[0], roots[1])[0] | ||
| area_upper = quad(f, roots[1], 1)[0] | ||
|
|
||
| ax.fill_between([0, 1], 0, roots[0], color='blue', alpha=0.15) | ||
| ax.text((f(0) + f(roots[0])) / 4, roots[0] / 2, f"{area_lower: .3g}") | ||
| w_middle = np.linspace(roots[0], roots[1], 20) | ||
| ax.fill_betweenx(w_middle, 0, g(w_middle), color='orange', alpha=0.15) | ||
| ax.text(np.mean(g(roots)) / 2, np.mean(roots), f"{area_middle: .3g}") | ||
| ax.fill_between([0, 1], roots[1], 1, color='blue', alpha=0.15) | ||
| ax.text((f(roots[1]) + f(1)) / 4, (roots[1] + 1) / 2, f"{area_upper: .3g}") |
Automated Translation Sync
This PR contains automated translations from QuantEcon/lecture-python.myst.
Source PR
#772 - [exchangeable] Simplify code and bring lecture into style-guide compliance
Files Updated
lectures/exchangeable.md.translate/state/exchangeable.md.ymlDetails
This PR was created automatically by the translation action.